> I've had a look at the List package and it seems that it is not properlyNo, it is not. Like many other functions on lists.
> tail recursive.
> Even more, for medium to large lists it exhausts theThe solution using List.reverse has unacceptable run-time penalty. In
> stack. I would suggest either recoding it as
> [with List.reverse]
> Another possibility would be to introduce destructive operations such as
> Scheme's setcdr! and setcar!. This would eliminate the need of using
> List.reverse, at the cost of introducing some imperative style.
particular, it heap-allocates twice as much than the natural
setcdr! for lists is not available in the language, since lists are
Let me put this another way. There are some library functions for
I would also contend that if your program routinely manipulate
- Xavier Leroy
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.