home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pop
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!doc.ic.ac.uk!syma!ianr
- From: ianr@syma.sussex.ac.uk (Ian Rogers)
- Subject: Re: POP syntax
- Message-ID: <1992Dec18.155912.13762@syma.sussex.ac.uk>
- Summary: Embaras de richesse
- Keywords: syntax, list, lexical, unfortunate
- Organization: University of Sussex at Brighton
- References: <57553@dime.cs.umass.edu>
- Date: Fri, 18 Dec 1992 15:59:12 GMT
- Lines: 15
-
- pop@cs.umass.edu ( Robin Popplestone ) writes:
- > On a more radical note, I have been doing some C programming recently. Now
- > as far as the semantics of C go, it feels rather like wiring one's house
- > with bare copper. But one has to admit that the syntax has a certain
- > concise elegance. Try out a CPOP (Popsie is already spoken for)
- >
- > maplist(x,f) { x=[]?[]:f(x)::maplist(tl(x),f)}
-
- Your definition won't work. Replace f(x) with f(hd(x)).
-
- Besides, the (literaly) equivalent Pop11 is no less concise (or more clear :)
-
- define maplist(x, f); x=[]and[]or f(hd(x))::maplist(tl(x),f) enddefine;
-
- Ian.
-