-
Notifications
You must be signed in to change notification settings - Fork 1
Partial Application Discussion #12
Copy link
Copy link
Open
Labels
Description
Let's talk about syntax for partial application of functions. Blame Steve. I disagree with Steve entirely, and believe it should be square brackets - and that the operation should potentially be over-loadable on a per-function basis via a meta-function.
thingy(x,y,z)
#Can be (fully) partially applied as
thingy[x][y][z]
This makes it very clear when you partially apply a tuple argument without the need for further grouping symbols.
thingy2((x,y),z)
#Can be (fully) partially applied as
thingy2[x,y][z]
I think this is sensible - especially if tuples are implicit during declaration or return without grouping symbols, for example:
T -> J -> (T, J)
fn thingy(x, y)
x, y
fn letter
let | x = 23, 24
thingy2[x](25)
Reactions are currently unavailable