How to create cycle function in elixir

Stream.cycle([1,2,3,4]) |> Enum.take(10)