0.. creates an infinite range. Use Iter.take to limit:
0..
Iter.take
// First 5 even numbers let evens = 0.. |> Iter.filter(|x| x % 2 == 0) |> Iter.take(5) |> Iter.collect() print(evens) // [0, 2, 4, 6, 8]
Goal: Use an infinite range to get the first 5 multiples of 7.
Run the code to see the output
9 results