Merge pull request #1987 from rtfeldman/builtins-list-split

Add builtin `List.split`
This commit is contained in:
Richard Feldman 2021-11-17 13:41:58 -05:00 committed by GitHub
commit 2bb007e08b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 197 additions and 13 deletions

View file

@ -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();