mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Change builitin List docs 'joinOks' to 'oks'
This commit is contained in:
parent
b84c7c50c7
commit
aa5107257e
1 changed files with 3 additions and 3 deletions
|
@ -274,15 +274,15 @@ join : List (List elem) -> List elem
|
|||
joinMap : List before, (before -> List after) -> List after
|
||||
|
||||
## Like #List.join, but only keeps elements tagged with `Ok`. Elements
|
||||
## tagged with `Err` are dropped.
|
||||
## tagged with anything else are dropped.
|
||||
##
|
||||
## This can be useful after using an operation that returns a #Result
|
||||
## on each element of a list, for example #List.first:
|
||||
##
|
||||
## >>> [ [ 1, 2, 3 ], [], [], [ 4, 5 ] ]
|
||||
## >>> |> List.map List.first
|
||||
## >>> |> List.joinOks
|
||||
joinOks : List (Result elem *) -> List elem
|
||||
## >>> |> List.oks
|
||||
oks : List [Ok elem]* -> List elem
|
||||
|
||||
## Iterates over the shortest of the given lists and returns a list of `Pair`
|
||||
## tags, each wrapping one of the elements in that list, along with the elements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue