Currently we cover consume on the Consume and Destructive Read section, but the text only uses it in the context of assigning the result to an iso variable:
fun test(a: Wombat iso) =>
var b: Wombat iso = consume a // Allowed!
We should mention that consume accepts an optional capability, like consume val or consume ref, although you can omit the capability and annotate the variable you're assigning:
let b: Wombat val = consume b
let b = consume val b // Same as above
This is similar to what can be done with recover, so I'm unsure if this should go in the "Consume and Destructive Read" section or in the "Recovering Capabilities" section.
Currently we cover
consume
on the Consume and Destructive Read section, but the text only uses it in the context of assigning the result to aniso
variable:We should mention that
consume
accepts an optional capability, likeconsume val
orconsume ref
, although you can omit the capability and annotate the variable you're assigning:This is similar to what can be done with
recover
, so I'm unsure if this should go in the "Consume and Destructive Read" section or in the "Recovering Capabilities" section.