From: moshez at math.huji.ac.il (Moshe Zadka)
Date: Sat, 10 Apr 1999 10:27:32 +0200
Subject: Idiom for Getting Slices of a List
Message-ID: <Pine.SUN.3.95-heb-2.07.990410102503.23259A-100000@sunset.ma.huji.ac.il>
X-UID: 841                                                  

Hi.

I want a clean, and relatively efficient method to do the following:
I have an array of length, n*m and I want to make it an array of 
length m, where each member is an array of length n.

Example: n=2, m=3
[0, 1, 2, 3, 4, 5] ==> [[0, 1], [2, 3], [4, 5]]

Anyone?

--
Moshe Zadka <mzadka at geocities.com>. 
QOTD: What fun to me! I'm not signing permanent.





