Peter Tanski wrote:
> Martin hit some of the best points I had to make on Haskell, so I
> will just add a very few things there and answer the leftovers...
>
> On Aug 31, 2006, at 2:40 AM, skaller wrote:
>
>> What's point-free style?
>
> Here is another example:
>
> getSongFiles :: Plist -> [String]
> getSongFiles = pTypeListToStrings . songFiles . onePDictToMap . tracks
>
> Each of those things after the = are functions;
> as you can see from getSongFiles's type signature, it takes an
> argument "Plist," but that isn't stated in the function, for example:
>
> getSongFiles pl = pTypeListToStrings . songFiles . onePDictToMap $
> tracks pl
>
> As for readability, just from reading across the line you know the
> inputs and outputs and the operations in the middle (assuming that
> you know what those other functions do).
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;
-------------------------------------------------------------------------
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