Content deleted Content added
→Amortized analysis and scheduling: copy edit |
Removed duplicate links and tag |
||
Line 1:
{{multiple issues|
{{expert needed|date=January 2017}}
{{refimprove|date=January 2017}}}}
Line 11 ⟶ 9:
==Ensuring that a data structure is purely functional==
A data structure is never inherently functional. For example, a stack can be implemented as a [[singly-linked list]]. This implementation is purely functional as long as the only operations on the stack return a new stack without altering the old stack. However, if the language is not
In order to ensure that a data structure is used in a purely functional way in an impure functional language, [[modular programming|modules]] or [[class (computer programming)|classes]] can be used to ensure manipulation via authorized functions only.
Line 29 ⟶ 27:
===Laziness and memoization===
One of the key tools in building efficient, purely functional data structures is
===Amortized analysis and scheduling===
Line 41 ⟶ 39:
====Example: queue====
[[Amortized queue]]s are composed of two
== Bibliography ==
|