Add List.concat

This commit is contained in:
Richard Feldman 2020-04-05 22:42:24 -04:00
parent 41662af399
commit 7ad4fb0e68
2 changed files with 10 additions and 0 deletions

View file

@ -408,6 +408,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// concat : List elem, List elem -> List elem
add_type(
Symbol::LIST_CONCAT,
SolvedType::Func(
vec![list_type(flex(TVAR1)), list_type(flex(TVAR1))],
Box::new(list_type(flex(TVAR1))),
),
);
// map : List before, (before -> after) -> List after
add_type(
Symbol::LIST_MAP,