mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 05:24:15 +00:00
remove zig implementation of keepIf/keepErrs/keepOks
This commit is contained in:
parent
addb27164e
commit
e29a89d33c
13 changed files with 21 additions and 721 deletions
|
|
@ -5043,34 +5043,6 @@ pub fn with_hole<'a>(
|
|||
let xs = arg_symbols[0];
|
||||
match_on_closure_argument!(ListMapWithIndex, [xs])
|
||||
}
|
||||
ListKeepIf => {
|
||||
debug_assert_eq!(arg_symbols.len(), 2);
|
||||
let xs = arg_symbols[0];
|
||||
let stmt = match_on_closure_argument!(ListKeepIf, [xs]);
|
||||
|
||||
// See the comment in `walk!`. We use List.keepIf to implement
|
||||
// other builtins, where the closure can be an actual closure rather
|
||||
// than a symbol.
|
||||
assign_to_symbol(
|
||||
env,
|
||||
procs,
|
||||
layout_cache,
|
||||
args[1].0, // the closure
|
||||
Loc::at_zero(args[1].1.clone()),
|
||||
arg_symbols[1],
|
||||
stmt,
|
||||
)
|
||||
}
|
||||
ListKeepOks => {
|
||||
debug_assert_eq!(arg_symbols.len(), 2);
|
||||
let xs = arg_symbols[0];
|
||||
match_on_closure_argument!(ListKeepOks, [xs])
|
||||
}
|
||||
ListKeepErrs => {
|
||||
debug_assert_eq!(arg_symbols.len(), 2);
|
||||
let xs = arg_symbols[0];
|
||||
match_on_closure_argument!(ListKeepErrs, [xs])
|
||||
}
|
||||
ListSortWith => {
|
||||
debug_assert_eq!(arg_symbols.len(), 2);
|
||||
let xs = arg_symbols[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue