There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:But I must say: having now had my first experience with Streams, I find it not
an easy or intuive going...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Stephan van Hulst wrote:(...)
Piet, your code groups characters by whether or not their value is even. The problem was to get which numbers represented
in the stream were even or odd.(...)
Streams become much more intuitive after you've worked with a lazy functional language. You shouldn't
regard streams as a weird type of collection, instead they're just sequences of operations that get performed
on a collection.
There are three kinds of actuaries: those who can count, and those who can't.
Winston Gutkowski wrote:
Welcome to functional programming.
(...)
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:In Java, a Stream is not a data type, and maybe lazyness plays a role, but in
the examples I've seen so far, no use of it was made. Well, not that I noticed.
Stephan van Hulst wrote:
Piet Souris wrote:In Java, a Stream is not a data type, and maybe lazyness plays a role, but in
the examples I've seen so far, no use of it was made. Well, not that I noticed.
And how would you notice?(...)
ghci> getOddValues "ODear 12340 et cetera 6 7"
[1,3,7]
There are three kinds of actuaries: those who can count, and those who can't.
Stephan van Hulst wrote:
The above would obviously not work if iterate() wasn't lazy.
Seeing as we're going wildly off topic, I'll split the thread.
There are three kinds of actuaries: those who can count, and those who can't.
Consider Paul's rocket mass heater. |