A few observations Re: Clean

Adrian Hey ahey@iee.org
Sat, 02 May 1998 15:54:14 +0100 (BST)


Regarding earlier messages about Cleans odd looking List syntax,
I have just discovered that not only can Clean Macros be infix
operators, but they can also be used in patterns.

This provides a way to give Clean a 'Cons' operator similar to
most other functional languages..

(:>) infixr 5
(:>) h t :== [h:t]

Page 93 of the Language report (V1.2) gives precisely this example
to illustrate Macro use. So people porting from other languages to
Clean can write functions like this...

mapit f []      = []
mapit f (x:>xs) = f x :> mapit f xs

..which will save a having to put in all those [..].

I haven't checked if 5 is a sensible precedence for this operator,
but since I can never remember operator precedences anyway I don't
think I'll bother.

Why didn't one of you expert Clean programmers out there tell me
about this? Perhaps someone did, which reminds me of yet another
gripe I have...

I often end up getting deleted fron clean-list immediately after
I submit a message. Some of you might be grateful for this:-)
Personally, I find this form of Computer Aided Censorship really
frustrating because I get to miss out on interesting stuff,
including other peoples responses to the message which got me
deleted in the first place.

One particular message I would like to have seen, but never did
(I presume I was a 'Persona Non Grata' at the time), was Melissa
O'Neils message about Rhapsody API functions associated with memory
management (Brent Knight told me about this). I had thought I'd wait
until it appeared in the archive, but this seems to be stuck at
Jan 15 at present. Would somebody who still has a copy of this be
kind enough to post it to me? (Don't go via clean-list though, I've
probably been deleted again :-)

Regards
-- 
Adrian Hey