Let's say I have the following code in F#:
let rec all_numbers_from k =
yield k
yield! all_numbers_from (k+1)
This code can be called as all_numbers_from 0
, generating all numbers from 0 to infinity. I know Python also has a yield
keyword, that seems to behave very much like F#'s yield
operator. My question is if there's also some sort of equivalent to F#'s yield!
operator?