You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
Tuples are probably not going to be implicitly defined on either LHS or RHS.
So far it's
fn thingy(x, y)
(x, y)
end
fn letter
let x = (23, 24) in
thingy2[x](25)
end
end
fn other_letter(some_tuple)
let (x, y) = some_tuple in
x
end
end
fn another_letter(some_vector)
let [x, y] = some_vector in
y
end
end
This way we can use the destructuring rules in the grammar for both let forms and pattern matches.
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.
This makes it very clear when you partially apply a tuple argument without the need for further grouping symbols.
I think this is sensible - especially if tuples are implicit during declaration or return without grouping symbols, for example:
The text was updated successfully, but these errors were encountered: