streams
Streams implementation in Erlang
The following is an example of how streams can be used to define the infinite Fibonacci sequence.
fibonacci() ->
fibonacci_helper(0, 1).
fibonacci_helper(M, N) ->
?STREAM(M, fibonacci_helper(N, M + N)).