I have some questions about backpassing:
backpassing is syntactic sugar for lambdas
so you can do anything with them that you could do with a lambda, and vice versa
so for example, these desugar to the same thing:
foo bar baz (\arg1, arg2, arg3 -> blah blah)
arg1, arg2, arg3 <- foo bar baz
blah blah
backpassing is sort of like "writing the lambda backwards"
the feature doesn't do anything other than being syntactic sugar for a lambda
and within an arg, you can have a pattern, but that must be exhaustive
right, same as a lambda
Thanks a lot! Makes a lot of sense.
(And sidestepping the whole 'MonadFail' debacle is probably a smart choice :upside_down: )
Can I describe “backpassing” as “do-notation for continuation-passing-style?”
Maybe not because backpassing only allows for one continuation.
Last updated: Jul 05 2025 at 12:14 UTC