mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Merge pull request #1987 from rtfeldman/builtins-list-split
Add builtin `List.split`
This commit is contained in:
commit
2bb007e08b
6 changed files with 197 additions and 13 deletions
|
@ -870,6 +870,9 @@ pub fn listSublist(
|
|||
len: usize,
|
||||
dec: Dec,
|
||||
) callconv(.C) RocList {
|
||||
if (len == 0) {
|
||||
return RocList.empty();
|
||||
}
|
||||
if (list.bytes) |source_ptr| {
|
||||
const size = list.len();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue