Rob Warnock wrote:
> or even this:
>
> (flet ((stepper (list)
> (case (car list)
> ((:one) (cddr list))
> ((:two) (cdddr list))
> ((:three) (cdddr list))
Wrong. Try cddddr.
> (otherwise (cdr list)))))
> (loop for (key a b c) on list by #'stepper ...))
>
> which can parse lists like this:
>
> (:one 123 :two 234 453 :three 7 5 8 :special :other 99 22 :two 34 54)
Wrong. :other isn't handled correctly.
Ruby:
[:one,123,:two,234,453,:three,7,5,8,:special,:other,99,22,:two,34,54].
slice_before{|x| x.is_a? Symbol}.to_a
===>
[[:one, 123],
[:two, 234, 453],
[:three, 7, 5, 8],
[:special],
[:other, 99, 22],
[:two, 34, 54]]
In Forth?
--
For two years ... he was held in solitary confinement in the Toronto West
Detention Centre.... [A] court in Mannheim sentenced him to five years
imprisonment for the crime of "popular incitement" under Germany's notorious
"Holocaust denial" statute.
www.revisionists.com/revisionists/zundel.html