Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!spool.mu.edu!agate!darkstar!ygdrasil!kjell From: kjell@ygdrasil.ucsc.edu (Kjell E Post) Newsgroups: comp.lang.apl Subject: Forks, Hooks and With in J Keywords: fork, hook, J Message-ID: Date: 3 Jun 91 10:17:53 GMT Article-I.D.: ygdrasil.kjell.675944273 Sender: usenet@darkstar.ucsc.edu Lines: 39 I've ordered the Tangible Math book and started to program in J, but find the use of & (with) confusing, especially in conjunction with forks and hooks. For instance, (0&,) and (,&0) seems to represent the trees , , / \ / \ 0 0 respectively. Is there any reason why this notation was chosen, i.e. what is the underlying functionality of '&'? I'm also curious about the expressibility of '&', fork, and hook. In particular, I'm interested in representing the following dag as a verb, using only '&', '~', fork/hook, and the items in the dag. # / \ +: \ / \ \ / , \ | / \ \ | }. 1 | | | | `----= | / \ | / \ | , \ | / \ \ / 0 + , / \ / \ 1 0 <--- Note: the empty leaves represents argument positions. -- | | |\ /| |\ |\ | Kjell Post | Vi i Sverige har blivit | /|\ | \/ | | \ | \ | CS Grad Student, UCSC | trygghetsnarkomaner. /|\ \|/ | | | | | email: kjell@cs.ucsc.edu | Livet best}r inte bara av / | \ | | | | | `--------------------------' trygghet. --Curt Nicolin