Haskell confusion (81)

57 Name: #!/usr/bin/anonymous : 2006-04-04 00:35 ID:jLQEuxPf

OK, so let's talk about this, >>54. You want a better method for partially evaluating functions. Maybe something like f:4=foo for a function that's like f, but it doesn't take the fourth argument of f, and uses foo for that instead. So basically, assuming f takes 5 arguments, it would be shorthand for (\a b c d -> f a b c foo d).

Is that the sort of thing you had in mind? If not, what would be a better way to do it? Are there any languages out there that implement a partial-evaluation method you find satisfactory? (Perl doesn't, to my knowledge, offer anything even as succinct as the lambda version, but my knowledge of Perl is limited.) Could you name some non-contrived situations in which the above sort of syntactic sugar offers significant advantage over currying and the use of combinators like flip?

This thread has been closed. You cannot post in this thread any longer.