mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Merge pull request #3399 from rtfeldman/pure-roc-map-with-index
Pure Roc `List.mapWithIndex`
This commit is contained in:
commit
93dbda9ac5
31 changed files with 231 additions and 367 deletions
|
@ -124,7 +124,6 @@ pub fn builtin_defs_map(symbol: Symbol, var_store: &mut VarStore) -> Option<Def>
|
|||
LIST_DROP => list_drop,
|
||||
LIST_DROP_AT => list_drop_at,
|
||||
LIST_SWAP => list_swap,
|
||||
LIST_MAP_WITH_INDEX => list_map_with_index,
|
||||
LIST_SORT_WITH => list_sort_with,
|
||||
LIST_IS_UNIQUE => list_is_unique,
|
||||
DICT_LEN => dict_len,
|
||||
|
@ -2365,11 +2364,6 @@ fn list_map(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
lowlevel_2(symbol, LowLevel::ListMap, var_store)
|
||||
}
|
||||
|
||||
/// List.mapWithIndex : List before, (before, Nat -> after) -> List after
|
||||
fn list_map_with_index(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
lowlevel_2(symbol, LowLevel::ListMapWithIndex, var_store)
|
||||
}
|
||||
|
||||
/// List.map2 : List a, List b, (a, b -> c) -> List c
|
||||
fn list_map2(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
lowlevel_3(symbol, LowLevel::ListMap2, var_store)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue