Logo

Programming-Idioms

History of Idiom 189 > diff from v1 to v2

Edit summary for version 2 by programming-idioms.org:
Original statement difficult to parse

Version 1

2019-09-27, 11:23:50

Version 2

2019-09-27, 13:06:55

Idiom #189 Filter a list by member and whole list and transform result

A common theme is collecting a top N entries from a list and returning a sparse version of the object to conserve bandwidth. In mathematical terms: Produce a list x with members i where P(i,x) is true, transforming i with T.

Idiom #189 Filter and transform list

Produce a new list y containing the result of function T applied to all elements of list x that match the predicate P.

Extra Keywords
map apply