News for hackers. Stuff that matters.
Re:Ask HN: How to compose two mapping functions into a third? by silentbicycle on Wednesday December 10, 2008 @10:51PM (#393919)
Abstract out the mapping itself, and then apply the composed transformation from map1 and map2 to it. map1 and map2 don't need to do any looping themselves, just work take an int and return an int.

Think of it in terms of doing all of your transformations in one pass, if that helps.

There are no comments on this comment yet.