mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
List.single implementation
This commit is contained in:
parent
d79f1af126
commit
97cb4a737e
5 changed files with 109 additions and 1 deletions
|
@ -507,6 +507,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// single : a -> List a
|
||||
add_type(
|
||||
Symbol::LIST_SINGLE,
|
||||
SolvedType::Func(vec![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