Re:Introducing a new data structure, streams, in Javascript
by pingswept on Sunday September 11, 2011 @01:35PM
(#2984246)
Yes, but it would have been significantly more baffling if the word "sieve" didn't hint at its behavior.
Still, I'm not sure that a functional background would have helped, or maybe my background is more functional than I think. I know some Python, and I read a few articles about functional programming a couple of years ago, but I don't think I could give you a clear definition of what functional programming is.
Re:Introducing a new data structure, streams, in Javascript
by romey on Tuesday September 13, 2011 @04:24PM
(#2993359)
The name "sieve" gave it away for me before I'd even looked at the code, but I decided to make sure I was right. Then i looked at it and my mind was kind of blown but how neat and concise it was. This definitely makes me want to take a look at functional programming (just ordered "The Little Schemer")
For me, I thought I had the answer after maybe 30 seconds of reading it, but decided to "check my work" by walking through it again, and only then, a moment later, did I realize what it was actually doing with that recursive call.
I'm just curious about their "most programmers without a functional background" remark. So: did ya get it?