2 ms·
If your language has do-notation or something like it, then CPS can be quite readable. With the syntax: cps { let! x = doThisThing let y = x *
by de_keyboard 6y ago
If your language has do-notation or something like it, then CPS can be quite readable.
With the syntax:
cps {
let! x = doThisThing
let y = x * 2 + 3
let! z = doOtherThing y
return z + 1
}
Without the syntax:
doThisThing.Then(fun x ->
let y = x * 2 + 3
doOtherThing(y).Then(fun z ->
z + 1
)
)