LIST_REVERSE works, so long as the list is made up of ints equal to 1

This commit is contained in:
Chad Stearns 2020-07-02 22:39:58 -04:00
parent d8a8741aed
commit 7bd7e697b0
4 changed files with 41 additions and 6 deletions

View file

@ -522,6 +522,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// reverse : List elem -> List elem
add_type(
Symbol::LIST_REVERSE,
SolvedType::Func(
vec![list_type(flex(TVAR1))],
Box::new(list_type(flex(TVAR1))),
),
);
// len : List * -> Int
add_type(
Symbol::LIST_LEN,