This is a dumb question I am sure, but I found no obvious answer in the 
standard docs. 

How does one take chunks of an array? In my particular case I also need 
them to overlap. What I need:

    list = [1,2,3,4,5]

    chunks(list, 3, 1)

    # -> [[1,2,3], [2,3,4], [3,4,5]]

Although I am sure it would return an iterator.

(Note, I am using the term "chunks" b/c that is the term Elixir uses for 
this).

Reply via email to