[comp.lang.functional] Simulating mutable lists in Miranda

eagle@cs.mcgill.ca (Anatol ORLOVSKY) (01/18/91)

  I would like to simulate LISP-like mutable lists in Miranda.
Operators should include list-surgery commands equivalent to LISP's 
rplaca (replace head of list), rplacd (replace tail), constant-time
append, etc.  
The structure itself should have the same generality as the LISP list
structure - i.e. arbitrary nesting and arbitrary element types should be
allowed. 
  How might such a structure be represented as a Miranda algebraic type?

Thanks in advance.