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
Conversation
Replying to
Maybe have a look at the label selective lambda calculus? Some form of it was eventually added to OCaml. Not sure if it covers optional parameters though.
Idris also has optional parameters, as part of the elaborator I think.
Replying to
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
Ahh was more pointing to the default parameter bit. Not sure if lslc covers it or if OCaml tacked it on afterwards.
1
Show replies

