mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
LIST_REVERSE works, so long as the list is made up of ints equal to 1
This commit is contained in:
parent
d8a8741aed
commit
7bd7e697b0
4 changed files with 41 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue