mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
commit
a9f7961b52
1 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@ withDefault = \result, default ->
|
|||
## function on it. Then returns a new `Ok` holding the transformed value. If the
|
||||
## result is `Err`, this has no effect. Use [mapErr] to transform an `Err`.
|
||||
## ```
|
||||
## Result.map (Ok 12) Num.negate
|
||||
## Result.map (Err "yipes!") Num.negate
|
||||
## Result.map (Ok 12) Num.neg
|
||||
## Result.map (Err "yipes!") Num.neg
|
||||
## ```
|
||||
##
|
||||
## Functions like `map` are common in Roc; see for example [List.map],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue