Implement sequence functor in coffeescript