Partition
can have lots of different arguments so I am curious whether the following results can be achieved using single Partition
instead of two.
Example 1:
Partition[#,2,1]&/@Partition[Range[12],3]
(* {{{1,2},{2,3}},{{4,5},{5,6}},{{7,8},{8,9}},{{10,11},{11,12}}} *)
Example 2:
Partition[#,2,1]&/@Partition[Range[20],4]
(* {{{1,2},{2,3},{3,4}},{{5,6},{6,7},{7,8}},{{9,10},{10,11},{11,12}},{{13,14},{14,15},{15,16}},{{17,18},{18,19},{19,20}}} *)