
20 Oct
2009
20 Oct
'09
11:27 a.m.
Now back to your original problem. Can you write a function g such that g [1,2,3,2,4,1,6,3,6,2,3,5,2,5,2,1,6,4] returns ([1,2,3],[2,4,1,6,3,6,2,3,5,2,5,2,1,6,4])
I know the diference between x and [x], my problem lies in going from [1,2,3,4,5,6,7] to [[1,2,3,4],[5,6,7]], I don't know how to write code that would group some elements together.