Path: utzoo!attcan!uunet!mcsun!ukc!warwick!nott-cs!piaggio!anw From: anw@maths.nott.ac.uk (Dr A. N. Walker) Newsgroups: comp.lang.misc Subject: Re: C's sins of commission Message-ID: <1990Oct15.175924.14455@maths.nott.ac.uk> Date: 15 Oct 90 17:59:24 GMT References: <1990Oct10.101527.2247@maths.nott.ac.uk> <1990Oct10.195202.2340@d.cs.okstate.edu> Reply-To: anw@maths.nott.ac.uk (Dr A. N. Walker) Organization: Maths Dept., Nott'm Univ., UK. Lines: 25 In article <1990Oct10.195202.2340@d.cs.okstate.edu> norman@d.cs.okstate.edu (Norman Graham) writes: >[...] you may want to read this >Miranda definition of a 3-ary tree (just to be different). I keep trying to get interested in Miranda, but "they" want real money for it, which is bad news for a Maths Dept. > three_tree ::= Leaf num | Node int three_tree three_tree three_tree Well, that's fine for an acyclic structure [though not the way I usually *think* of trees] and a lazy evaluator, but it doesn't make sense to me in the form three_graph ::= Node int three_graph three_graph three_graph Where does it all end, even lazily? How do I express the identity of one node with another [ie, perhaps the same node, but reached via some chain of edges]? How do I *draw* it? What is *anyone*'s objection to MODE NODE = STRUCT (INT info, REF NODE left, right, middle) ? -- Andy Walker, Maths Dept., Nott'm Univ., UK. anw@maths.nott.ac.uk