Skip to content
This repository has been archived by the owner on Jan 5, 2020. It is now read-only.

flatten & select #2

Open
guzhenhuaGitHub opened this issue Dec 11, 2017 · 0 comments
Open

flatten & select #2

guzhenhuaGitHub opened this issue Dec 11, 2017 · 0 comments

Comments

@guzhenhuaGitHub
Copy link

I tried this in playground:

let count = [1, 2, 3, nil, nil, 4, 5, 6, 7]
.flatten()

and I got an error:

Playground execution failed:

error: RbSwift.playground:1:6: error: cannot invoke 'flatten' with no arguments
.flatten()
^

and I tried this in playground:

let count = [1, 2, 3, nil, nil, 4, 5, 6, 7]
.flatten()
.select { true }

and I got count was a :

[]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant