On Aug 31, 2006, at 3:19 PM, Erick Tryzelaar wrote:
> fyi, felix can do this:
>
> #import <flx.flxh>
>
> open List;
>
> fun compose[T,U,V] (f:T->U, g:U->V) => fun (x:T) => g(f(x));
>
> #infix 10 o compose
>
> fun f1 (x:int) => Int::str x;
> fun f2 (y:string) => Empty[string] + 'hello' + y;
>
> val f = (the f1) o (the f2);
>
> List::iter (proc (x:string) { print x; endl; })$ f 5;
Thanks for the example! The examples I was giving were illustrations
of what is a "functional" language, which Felix is. My main point
was that functional is hard to understand.
-Pete
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language