[Haskell-cafe] Evaluating arithmetic expressions at run time

Brian Hulley brianh at metamilk.com
Sat Jan 28 07:13:07 EST 2006


Brian Hulley wrote:
> eg myeval (+) 1 2

myeval 1 2 (+)            -- I *always* seem to make at least one mistake 
per post ;-)

(I originally wrote the code to take the op first, which is the usual 
Haskell convention so that you can do useful things with (myeval  someop) 
but then I noticed you had the op arg last in your Ruby example so I changed 
the code but forgot to change my example...) 



More information about the Haskell-Cafe mailing list