Nice! ... Thanks Alex,
Regards,
Kashyap
On Wed, Mar 4, 2020 at 10:17 PM Alexander Burger
wrote:
> Hi Kashyap,
>
> > I've written a function to break a list into chunks of size N -
> >
> > (de Chunks (Lst N)
> >(make
> > (while Lst
> > (link (head N Lst))
> > (cut N 'L
Hi Kashyap,
> I've written a function to break a list into chunks of size N -
>
> (de Chunks (Lst N)
>(make
> (while Lst
> (link (head N Lst))
> (cut N 'Lst) ) ) )
This works, but 'head' and 'cut' both traverse the list, so the work is
duplicated. Just 'cut' suffices.
Hi all,
I've written a function to break a list into chunks of size N -
(de Chunks (Lst N)
(make
(while Lst
(link (head N Lst))
(cut N 'Lst) ) ) )
Does this look reasonable? Or am I missing something builtin?
Regards,
Kashyap