3 ms·
This uses a difference list data structure, which, when I learned it in Prolog, requires lazy evaluation of the tail of the list. Erlang doesn't seem to allow
by thyrsus 9y ago
This uses a difference list data structure, which, when I learned it in Prolog, requires lazy evaluation of the tail of the list.
Erlang doesn't seem to allow lazy evaluation; am I wrong about that? Is there some way to do difference lists in Erlang?
- thyrsus 9y agoCorrection: it needs unbound variables, not lazy evaluation. Erlang doesn't have unbound variables; I suspect one would have to implement some form of that before implementing difference lists.