The code following
Result has several features for working…
The code given as an example using map(_: ) on Result should read:
let numbersResult: Result<[Int], Error> = tokensResult.map { tokens in
tokens.compactMap { token in
switch token {
case let .number(digit): return digit
default: return nil
}
}
}
bun “tokens in” is missing.