by codebje · 4y ago · 0 comments
The await keyword might make it look like you can escape the box - but in effect a statement like "let x = await y" is just expanding the async box around y to also be around the bock containing that statement.
Since we already have a function to take a plain value to one in a box ((1) above) and a way to apply a function that turns a value from a box into another boxed value, lifting is just function composition:
box.lift(f) = box.map(val -> from(f(val)))No comments yet.