mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Add dropLast to tests and parser
This commit is contained in:
parent
51de420ee7
commit
49a832d757
7 changed files with 77 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue