Sha256: cfde16b43dde8cde56987085c2d675f85f5fc41cd6eec938dc5b81596b6a5fa1

Contents?: true

Size: 308 Bytes

Versions: 6

Compression:

Stored size: 308 Bytes

Contents

Take a nested list and return a single list with all values except nil/null.

The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
 
For Example

input: [1,[2,3,null,4],[null],5]

output: [1,2,3,4,5]

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trackler-2.1.0.24 common/exercises/flatten-array/description.md
trackler-2.1.0.23 common/exercises/flatten-array/description.md
trackler-2.1.0.22 common/exercises/flatten-array/description.md
trackler-2.1.0.21 common/exercises/flatten-array/description.md
trackler-2.1.0.20 common/exercises/flatten-array/description.md
trackler-2.1.0.19 common/exercises/flatten-array/description.md