mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
remove redunant list.sublist check
This commit is contained in:
parent
223efe4a2d
commit
26afbbe8f6
1 changed files with 1 additions and 4 deletions
|
@ -1123,9 +1123,6 @@ findLastIndex = \list, matches ->
|
||||||
## Some languages have a function called **`slice`** which works similarly to this.
|
## Some languages have a function called **`slice`** which works similarly to this.
|
||||||
sublist : List elem, { start : Nat, len : Nat } -> List elem
|
sublist : List elem, { start : Nat, len : Nat } -> List elem
|
||||||
sublist = \list, config ->
|
sublist = \list, config ->
|
||||||
if config.len == 0 then
|
|
||||||
[]
|
|
||||||
else
|
|
||||||
sublistLowlevel list config.start config.len
|
sublistLowlevel list config.start config.len
|
||||||
|
|
||||||
## low-level slicing operation that does no bounds checking
|
## low-level slicing operation that does no bounds checking
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue