mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Merge remote-tracking branch 'origin/trunk' into backpassing
This commit is contained in:
commit
dbb4758cb9
40 changed files with 3279 additions and 2638 deletions
|
@ -804,6 +804,19 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
)
|
||||
});
|
||||
|
||||
// map2 : List a, List b, (a, b -> c) -> List c
|
||||
add_type(Symbol::LIST_MAP2, {
|
||||
let_tvars! {a, b, c, cvar};
|
||||
top_level_function(
|
||||
vec![
|
||||
list_type(flex(a)),
|
||||
list_type(flex(b)),
|
||||
closure(vec![flex(a), flex(b)], cvar, Box::new(flex(c))),
|
||||
],
|
||||
Box::new(list_type(flex(c))),
|
||||
)
|
||||
});
|
||||
|
||||
// append : List elem, elem -> List elem
|
||||
add_type(
|
||||
Symbol::LIST_APPEND,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue