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
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.
2
Idris also has optional parameters, as part of the elaborator I think.

