05 Functional Data Structures

A functional data structure is a data structure with no mutable values.

We call them "persistent" rather than "ephemeral."

You might ask about efficiency..

It's possible that they might be less efficient. The OCaml compiler is good at making sure that things stay memory efficient. In terms of time complexity, sometimes functional data structures do increase time complexity. Usually, as a rule of thumb, you can assume that functional data structures increase time complexity by a logarithmic amount.