This is about algorithms over immutable or persistent data structures, not about algorithms operating on functions, a common and unfortunate misnaming.<p>Ocaml is functional but allows arbitrary state mutations. On the other hand it is typically very straightforward to implement persistent data structures in a non-functional language with GC support.