Just came across some super useful one-liners in Coffeescript. Worth checking out.
Just in case someone interested doesn't know this many of these ideas are using a programming perspective called functional programming. For instance map and fold are examples of "higher order functions", and can be used to do very powerful things without writing a lot of code.
More info, https://en.m.wikipedia.org/wiki/Functional_programming.