Here's one way:
foo = (n) -> ((a) -> a).bind(null, i) for i in [0...n]
foo = (n) -> (-> +@).bind i for i in [0...n]
Here's one way:
Here's a more esoteric/bad style (but cute) way: