In Haskell I can do this to handle an infinite list.
takeWhile (<1000) [1 ..]
Is there a way to this in CoffeeScript?
StreamJS enables the creation of 'infinite' lists in javascript.
Using it's (rough) coffeescript port:
# Stream.range() creates a list from 1...Infinity
numbers = Stream.range().until (x) -> x > 1000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With