Yup!  I have already come to that conclusion and written my code such that
the current iteration uses [0] and then hands [1] into the next call!  I am
beginning to develop warm feelings about neko all over again. LOL.


list_muncher = function( alist, acc ) {
  if ( $asize( alist ) == 0 ) {
    return acc; }
  else {
    var newValue = function_on( alist[0] );
    list_muncher( alist[1], $array( newValue, acc )); }}


This is so close to LISP/scheme idiom I feel really comfortable in this
zone!
Thanks for your confirmation.
Sean Charles
:)

On Sun, Aug 17, 2008 at 10:39 PM, Kacper Gutowski <[EMAIL PROTECTED]>wrote:

> On Sun, Aug 17, 2008 at 11:08 PM, Sean Charles <[EMAIL PROTECTED]>
> wrote:
> > What I want to know is: what is the 'list' type and how do I deal with it
> ?
>
> If I understand correctly you already realised that there is no 'list'
> data type. You comparison with car/cdr is actually quite correct.
> However Neko does not have anything called conses, it simply uses
> two-element arrays instead so [0] is your car and [1] is your cdr.
> Just like that.
>
> Except arrays organised like that when you see 'list' in docs.
>
> --
> Kacper Gutowski
>
> --
> Neko : One VM to run them all
> (http://nekovm.org)
>
-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to