Version française
Home     About     Download     Resources     Contact us    
Browse thread
[OSR] Standard syntax extensions ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] [OSR] Standard syntax extensions ?
I think this would be useful. However, you can already do it in a
slightly more complex fashion.

>From the top of my mind, with

let ( /* ) f g = f g
let ( */ ) f g x = g f x

you can achieve

1 /* mem */ [1;2;3]

with the added bonus that a C programmer will never be able to read your
code :)

Cheers,
 David

On Sat, 2008-04-26 at 09:53 +0200, Till Crueger wrote:
> I am posting this in this thread, because this would allow us to write the  
> above more elegantly as:
> 1 `mem` [1;2;3], which is close to what was originally proposed.
> 
> What do you think of this?
> 
> bye,
>    Till
> 
> 
-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.