This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

list-split



>is there another way to split a list than to use list-head and
>list-tail?
>
>I would like to avoid running twice through the list to the point where
>the list should be splitted.

I don't know of a primitive to do this.

The funny thing about interpreters is that you're probably better off
scanning the list twice in primitives than once in interpreted code.
Unless you're sure it's a problem, I'd just write the obvious code and
be done with it.