pythonic_fp.splitends¶
Mutable stack objects that can safely share data.
Python package Implementing a singularly linked LIFO queue
called a SplitEnd
. These data structures can safely share
data nodes between themselves.
each
SplitEnd
is a very simple stateful (mutable) LIFO stackdata can be “extended” to or “snipped” off of the end (tip)
the “root” value of a
SplitEnd
is fixed and cannot be “snipped”different mutable split ends can safely share the same “tail”
each
SplitEnd
sees itself as a singularly linked listbush-like datastructures can be formed using multiple
SplitEnds
the
SplitEnd
copy method andlen
are O(1)in boolean context returns true if the
SplitEnd
is not just a “root”