[mercury-users] Currying to create a higher-order value.

Peter Wang novalazy at gmail.com
Wed Sep 26 14:21:12 AEST 2007

On 2007-09-26, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> Recently I submitted a changeset to mercury-reviews for review.  Peter
> suggested that could use currying to write less code, I've used currying
> before to create a higher order term from a predicate name and some
> variables such as.
>     map(transform(Some, Args), ListIn, ListOut)
> However I already have a higher order term which I'm trying to curry.
> This seems to upset the complier.
>     list.takewhile(RawThresholdPred(Deep, Threshold), DescendingPSIs, TopPSIs, 
>         _)

Sorry Paul.  Indeed you can't use currying in this case.


mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au

More information about the users mailing list