[mercury-users] Idea for a currying library
    Peter Schachte 
    schachte at cs.mu.OZ.AU
       
    Wed Jan 19 10:45:31 AEDT 2000
    
    
  
On Mon, Jan 17, 2000 at 11:31:01AM +1300, Richard A. O'Keefe wrote:
> Peter Schachte wrote:
> 	Richard goes on to recommend
>                            *********	
> 
> What I wrote was that I "could well have recommended" something
> "as a good-enough notation".  Note the tense!  I did *not* say that
> I recommend it *now*.
Apologies for misrepresenting your position.
> 	once
> 	both conventions are explained, I find
> 	
> 		maplist((#1 > 0), Numbers)
> 	
> 	very much clearer than
> 	
> 		maplist(call_2_1(>,0), Numbers)
> 	
> The point of my message is that *neither* of them is clear.
>
> 	maplist((pred(X) => X > 0), Numbers)
> 
> is clearer by far than any counting notation at all.
I dunno.  I find
	maplist((#1 > 0), Numbers)
a little better than
	maplist((pred(X) => X > 0), Numbers)
It has the disadvantage that you can't give reasonable names to the
lambda-abstracted variables, but the advantage of being quite compact
and easy to parse visually.
But that's really a moot point.  As long as mode and determinism need
to be explicitly included in lambda abstractions, neither is going to
be possible.  And if/when mode and determinism can be inferred, my
preferred notation isn't really enough better to be worth the
complication to the language.
-- 
Peter Schachte                     The universe is full of magical things,
mailto:schachte at cs.mu.OZ.AU        patiently waiting for our wits to grow
http://www.cs.mu.oz.au/~schachte/  sharper.
PGP: finger schachte at 128.250.37.3      -- Eden Phillpotts 
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
    
    
More information about the users
mailing list