Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!quiche!eagle From: eagle@cs.mcgill.ca (Anatol ORLOVSKY) Newsgroups: comp.lang.functional Subject: Simulating mutable lists in Miranda Message-ID: <1991Jan17.220938.11643@cs.mcgill.ca> Date: 17 Jan 91 22:09:38 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 12 Originator: eagle@bart 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.