mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
make dropFirst and dropLast drop n elements
This commit is contained in:
parent
cb6b36e218
commit
139d3c6f89
48 changed files with 3518 additions and 3470 deletions
|
@ -329,7 +329,7 @@ fn decode() {
|
|||
|
||||
u8 = @MDecoder \lst, @Linear {} ->
|
||||
when List.first lst is
|
||||
Ok n -> { result: Ok n, rest: List.dropFirst lst }
|
||||
Ok n -> { result: Ok n, rest: List.dropFirst lst 1 }
|
||||
Err _ -> { result: Err TooShort, rest: [] }
|
||||
|
||||
MyU8 := U8 implements [MDecoding {decoder}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue