pattern references, lambdas
Brian Goetz
brian.goetz at oracle.com
Fri Jan 11 12:46:43 UTC 2019
> So to not constrain the number of elements extracted, and to allow the components to be reduced back into a single result (or constrained number of outputs) in one neat little linguistic construct, perhaps you're alluding to something like allowing patterns to appear in place of lambda parameters, deconstructing arguments in-place?
I wish it were that easy! But yes, you can think of this as fusing a pattern which maps a target to a cloud of bindings, and a function which takes those bindings and maps them back to a value, wrapped in some sort of Kleisli category (Optional, Stream, etc.), resulting in a function from your target to whatever the representation is in your category.
More information about the amber-dev
mailing list