mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
update internal references to Result.map
This commit is contained in:
parent
326558337c
commit
297dd0233e
6 changed files with 11 additions and 11 deletions
|
@ -32,7 +32,7 @@ cheapest_open = \cost_fn, model ->
|
|||
)
|
||||
|> Quicksort.sort_by(.cost)
|
||||
|> List.first
|
||||
|> Result.map(.position)
|
||||
|> Result.map_ok(.position)
|
||||
|> Result.map_err(\_ -> {})
|
||||
|
||||
reconstruct_path : Dict position position, position -> List position where position implements Hash & Eq
|
||||
|
|
|
@ -12,7 +12,7 @@ main! = \{} ->
|
|||
closure1 : {} -> Result {} []
|
||||
closure1 = \_ ->
|
||||
Ok(foo(to_unit_borrowed, "a long string such that it's malloced"))
|
||||
|> Result.map(\_ -> {})
|
||||
|> Result.map_ok(\_ -> {})
|
||||
|
||||
to_unit_borrowed = \x -> Str.count_utf8_bytes(x)
|
||||
|
||||
|
@ -25,8 +25,8 @@ closure2 = \_ ->
|
|||
x = "a long string such that it's malloced"
|
||||
|
||||
Ok({})
|
||||
|> Result.map(\_ -> x)
|
||||
|> Result.map(to_unit)
|
||||
|> Result.map_ok(\_ -> x)
|
||||
|> Result.map_ok(to_unit)
|
||||
|
||||
to_unit = \_ -> {}
|
||||
|
||||
|
@ -37,7 +37,7 @@ closure3 = \_ ->
|
|||
x = "a long string such that it's malloced"
|
||||
|
||||
Ok({})
|
||||
|> Result.try(\_ -> Ok(x) |> Result.map(\_ -> {}))
|
||||
|> Result.try(\_ -> Ok(x) |> Result.map_ok(\_ -> {}))
|
||||
|
||||
# # ---
|
||||
closure4 : {} -> Result {} []
|
||||
|
@ -47,4 +47,4 @@ closure4 = \_ ->
|
|||
|
||||
Ok({})
|
||||
|> Result.try(\_ -> Ok(x))
|
||||
|> Result.map(\_ -> {})
|
||||
|> Result.map_ok(\_ -> {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue