List.contains in Zig

This commit is contained in:
Folkert 2021-02-17 22:01:33 +01:00
parent a3d0dc2fc3
commit 7bd228ca9b
5 changed files with 102 additions and 199 deletions

View file

@ -3724,19 +3724,11 @@ fn run_low_level<'a, 'ctx, 'env>(
// List.contains : List elem, elem -> Bool
debug_assert_eq!(args.len(), 2);
let (list, list_layout) = load_symbol_and_layout(scope, &args[0]);
let list = load_symbol(scope, &args[0]);
let (elem, elem_layout) = load_symbol_and_layout(scope, &args[1]);
list_contains(
env,
layout_ids,
parent,
elem,
elem_layout,
list,
list_layout,
)
list_contains(env, layout_ids, elem, elem_layout, list)
}
ListWalk => {
debug_assert_eq!(args.len(), 3);