[−][src]Crate fplist
An immutable singly-linked list whose elements persist through multiple "modification".
Each "modification" returns a new list with the changes, but leaving the original unscathed. Memory is shared across the new lists, and is only deallocated once the last list referencing the memory is dropped.
This is accomplished with the built-in Rc
type, but may be replaced with its multithreaded sibling, Arc
, if so desired
through the multithreaded
feature.
Specify the serde_impls
feature to turn on serde support.
Structs
ListIter | A view to a list's elements, expressed as an iterator. |
OwnedListIter | An owning view to a list. |
PersistentList | An immutable singly-linked list. |
Functions
cons | Construct a new list by prepending one element to the next list. |
list | Create a new list out of an iterable. |
one | Create a new list with one element. |