mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
update formatting
This commit is contained in:
parent
a86c8d7994
commit
c4d56f1dc9
1 changed files with 4 additions and 2 deletions
|
@ -726,6 +726,7 @@ rangeHelp = \accum, i, calcNext, isValid ->
|
|||
rangeHelp (List.append accum val) (calcNext val) calcNext isValid
|
||||
else
|
||||
accum
|
||||
|
||||
Err _ ->
|
||||
# We went past the end of the numeric range and there is no next.
|
||||
# return the generated list.
|
||||
|
@ -738,6 +739,7 @@ rangeLengthHelp = \accum, i, remaining, calcNext ->
|
|||
when i is
|
||||
Ok val ->
|
||||
rangeLengthHelp (List.appendUnsafe accum val) (calcNext val) (remaining - 1) calcNext
|
||||
|
||||
Err _ ->
|
||||
# We went past the end of the numeric range and there is no next.
|
||||
# The list is not the correct length yet, so we must crash.
|
||||
|
@ -774,10 +776,10 @@ expect
|
|||
List.range { start: After 250u8, end: At 255 } == [251, 252, 253, 254, 255]
|
||||
|
||||
expect
|
||||
List.range { start: After 250u8, end: At 255 , step: 10} == []
|
||||
List.range { start: After 250u8, end: At 255, step: 10 } == []
|
||||
|
||||
expect
|
||||
List.range { start: After 250u8, end: At 245 , step: 10} == []
|
||||
List.range { start: After 250u8, end: At 245, step: 10 } == []
|
||||
|
||||
expect
|
||||
List.range { start: At 4, end: At 0 } == [4, 3, 2, 1, 0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue