I’ve just lately been getting an increasing number of considering useful programming and lambda calculus with combinators and so forth… and an increasing number of I see myself constructing features that refactor into extra generic features and may’t cease myself pondering is that this a “well-known” or “named” sample or combinator and so forth…
Anyway, my newest little perform utilizing
const transformSomeJson = elements => json => _.stream( _.map(f => f(json)), _.mergeAll )(elements);
The place elements is itself an array of features that take some JSON and return an object with key/worth pairs.
The perform maps over the array of features working each and passing within the json to get the perform’s output after which merges the objects collectively right into a single object.
So it is comparable in a technique to a map/scale back count on I am not mapping an array of knowledge with a single perform. I am mapping an array of features and working each with a single bit of knowledge.
Is that technically the identical factor? Or does this have another title? Or is it so trivial that it is not worthy of being named, it is only a perform?
I haven’t got wherever that I can go to look these up (I am new to this and have not constructed up an inventory of sources but). In order a little bit facet query, is there such an inventory of references that I can use to reply these questions myself?