There is no source because it's not true
fn outer() -> Result(success, failure) {
result.map(parse_id(), fn(id) {
... // More code that uses the id
})
}
Becomes: fn outer() -> Result(success, failure) {
use id <- result.map(parse_id())
... // More code that uses the id
}
In more concrete terms, I’m building an application with Gleam and Wisp that uses Wisp’s `require_form`. The type signature for `require_form` is: pub fn require_form(
request: Request(Connection),
next: fn(FormData) -> Response(Body),
) -> Response(Body)
But I get to use it like this: use form <- wisp.require_form(req)
I’m not sure if I have the appropriate nomenclature here, and I consider myself a beginner of writing strongly typed functional languages, but when I use `use`, I get to invoke the callback with the value on the left side of the arrow.