remove redunant list.sublist check

This commit is contained in:
Brendan Hansknecht 2023-11-20 11:23:13 -08:00
parent 223efe4a2d
commit 26afbbe8f6
No known key found for this signature in database
GPG Key ID: 0EA784685083E75B

View File

@ -1123,10 +1123,7 @@ findLastIndex = \list, matches ->
## Some languages have a function called **`slice`** which works similarly to this.
sublist : List elem, { start : Nat, len : Nat } -> List elem
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
sublistLowlevel : List elem, Nat, Nat -> List elem