kibit icon indicating copy to clipboard operation
kibit copied to clipboard

Suggest keep instead of (filter identity) or (remove some?)

Open danielcompton opened this issue 9 years ago • 0 comments

Keep:

Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included.

This is a good replacement for (->> (map f) (filter identity)) like code, although there is the distinction to be made between false and nil values. I think it's fine for (->> (map f) (remove nil?)) though.

danielcompton avatar Oct 06 '15 00:10 danielcompton