Skip to content

1.1.0 - Added `echo` functions

Compare
Choose a tag to compare
@KyNorthstar KyNorthstar released this 20 May 15:56
· 17 commits to master since this release
b813c5f

Like it says on the tin, these just echo what they're given.

The first version simply returns the value it's given. This is useful for reusing the input of higher-order functions:

let withoutNils = arrayOfOptionals.compactMap(echo)

The second version is useful for flattening collections of generators:

let values = generators.map(echo)