Add dropLast to tests and parser

This commit is contained in:
Chelsea Troy 2021-10-21 23:02:26 -05:00
parent 51de420ee7
commit 49a832d757
No known key found for this signature in database
GPG key ID: A631885A970636C2
7 changed files with 77 additions and 0 deletions

View file

@ -934,6 +934,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
Box::new(list_type(flex(TVAR1))),
);
// dropLast : List elem -> List elem
add_top_level_function_type!(
Symbol::LIST_DROP_LAST,
vec![list_type(flex(TVAR1))],
Box::new(list_type(flex(TVAR1))),
);
// swap : List elem, Nat, Nat -> List elem
add_top_level_function_type!(
Symbol::LIST_SWAP,