On Thu, 20 Sep 2007 14:09:26 +0200, Andreas Rossberg wrote: > gabriele renzi wrote: <snip>
>> If compare was a single-valued function I'd do: >> Int.compare o look >> >> but since it takes 2 args I don't know how to handle it. >> > > Pair.mapBoth may be what you want, so you can write > > List.sort (Int.compare o Pair.mapBoth look) aList ah, I should think of the Pair class more often, thank you. >> Is it possible to define (or better, it is alread there) an n-compose >> function that I could use in conjunction with Fn.curry ? >> >> I am unable to find a type for it, but I have the feeling it is impossible >> to define (I can't come up with a type for it) ? >> > > There is no direct way of expressing what you intend in a more general > way. You can do so using a significant amount of type trickery for > encoding so-called type-indexed values, though, e.g. look here: <snip> thanks for the reference, it will be hard to digest but it seems quite interesting. PS since the gmane link reminded me: the nntp server at news.ps.uni-sb.de seems offline. If it was shut down on purpose maybe the contact page should be changed to point to the gmane gateway to the mailing list? -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info _______________________________________________ alice-users mailing list [email protected] http://www.ps.uni-sb.de/mailman/listinfo/alice-users
