Anonymous user
VList: Difference between revisions
→{{header|Component Pascal}}: format comments
(→{{header|Component Pascal}}: format comments) |
|||
Line 383:
MODULE RosettaVLists;
(** In 2002, Phil Bagwell published "Fast Functional Lists" which introduced VLists as alternatives to Functional Programming's
ubiquitous linked lists and described Visp (a dialect of Common Lisp) using VLists, but including a "foldr" function,
optimized to use VLists. VLists have the same properties as immutable functional linked lists (including full persistence); but,
unlike a linked list, with O(1) random access time. The VLists implemented here is based on section 2.1 of that article but has been
modified to retain the safety features of Component Pascal.
Methods provided for manipulating VLists are named after their corresponding Visp functions, but follow Component Pascal's case conventions. **)
|