mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
List.contains in Zig
This commit is contained in:
parent
a3d0dc2fc3
commit
7bd228ca9b
5 changed files with 102 additions and 199 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue