hjwylde / qux-java

UNSUPPORTED: The Qux Development Kit
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

High Order Functions #67

Open hjwylde opened 10 years ago

hjwylde commented 10 years ago

I would like to support high-order functions, i.e., fold(&max, xs). The & operator can be used to get the address of the function. It should only work on functions and not methods.

hjwylde commented 10 years ago

Composition and currying of functions would be awesome too.

Perhaps the pipe for composition, &max | &abs, to feed the return value into the other function.

When calling a function and using the address of operator, it could be considered currying, I.e., &max(0).