Conversation

are there languages with λs where which ids are params is only specified at the callsite? like with the closure providing defaults. similar to optional params. eg if we do let🔧= + let🍎= 2 let🍊= 3 let 🔥= λ{🍎🔧🍊} then we can do 🔥() = 5 🔥(🍎: 4🍊: 4) = 8 🔥(🔧: *) = 6
9
9
hmm... i may be misunderstanding the lslc, but i don't think it's the same? lslc lambdas specify a variable. in my version, lambdas have no explicitly associated local variables; or equivalently, every variable in their body is potentially a local variable
1
yes. to be precise, the definition site semantics are identical to a typical function definition in a language with closures, except treating every definition as a zero-parameter function. but at each call site, you can choose to override any number of values in the closure.
1
Show replies