mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
sortWith boilerplate done
This commit is contained in:
parent
1320930a73
commit
7045737669
8 changed files with 111 additions and 1 deletions
|
@ -89,6 +89,7 @@ pub fn builtin_defs_map(symbol: Symbol, var_store: &mut VarStore) -> Option<Def>
|
|||
LIST_KEEP_ERRS=> list_keep_errs,
|
||||
LIST_WALK => list_walk,
|
||||
LIST_WALK_BACKWARDS => list_walk_backwards,
|
||||
LIST_SORT_WITH => list_sort_with,
|
||||
DICT_TEST_HASH => dict_hash_test_only,
|
||||
DICT_LEN => dict_len,
|
||||
DICT_EMPTY => dict_empty,
|
||||
|
@ -2218,6 +2219,11 @@ fn list_map3(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
lowlevel_4(symbol, LowLevel::ListMap3, var_store)
|
||||
}
|
||||
|
||||
/// List.sortWith : List a, (a, a -> Ordering) -> List a
|
||||
fn list_sort_with(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
lowlevel_2(symbol, LowLevel::ListSortWith, var_store)
|
||||
}
|
||||
|
||||
/// Dict.hashTestOnly : k, v -> Nat
|
||||
pub fn dict_hash_test_only(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
lowlevel_2(symbol, LowLevel::Hash, var_store)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue