Merge pull request #3399 from rtfeldman/pure-roc-map-with-index

Pure Roc `List.mapWithIndex`
This commit is contained in:
Folkert de Vries 2022-07-06 00:25:46 +02:00 committed by GitHub
commit 93dbda9ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 231 additions and 367 deletions

View file

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