mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
unified formatting for walk
This commit is contained in:
parent
158691fb27
commit
ffa1dd5703
1 changed files with 5 additions and 1 deletions
|
@ -1514,7 +1514,11 @@ for_each_try! = \list, func! ->
|
||||||
walk! : List elem, state, (state, elem => state) => state
|
walk! : List elem, state, (state, elem => state) => state
|
||||||
walk! = \list, state, func! ->
|
walk! = \list, state, func! ->
|
||||||
when list is
|
when list is
|
||||||
[] -> state
|
[] ->
|
||||||
|
state
|
||||||
|
|
||||||
[elem, .. as rest] ->
|
[elem, .. as rest] ->
|
||||||
next_state = func!(state, elem)
|
next_state = func!(state, elem)
|
||||||
walk!(rest, next_state, func!)
|
walk!(rest, next_state, func!)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue