mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Swap List.mapWithIndex arg1 args order to put the element first
This commit is contained in:
parent
92e0f8714f
commit
f47dbb5171
7 changed files with 8 additions and 8 deletions
|
@ -1078,14 +1078,14 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(list_type(flex(TVAR2))),
|
||||
);
|
||||
|
||||
// mapWithIndex : List before, (Nat, before -> after) -> List after
|
||||
// mapWithIndex : List before, (before, Nat -> after) -> List after
|
||||
{
|
||||
let_tvars! { cvar, before, after};
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_MAP_WITH_INDEX,
|
||||
vec![
|
||||
list_type(flex(before)),
|
||||
closure(vec![nat_type(), flex(before)], cvar, Box::new(flex(after))),
|
||||
closure(vec![flex(before), nat_type()], cvar, Box::new(flex(after))),
|
||||
],
|
||||
Box::new(list_type(flex(after))),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue