mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Merge branch 'trunk' into builtins-list-intersperse
This commit is contained in:
commit
ce8a88416d
319 changed files with 4413 additions and 3654 deletions
|
@ -1015,6 +1015,25 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(list_type(flex(TVAR1))),
|
||||
);
|
||||
|
||||
// split : List elem, Nat -> { before: List elem, others: List elem }
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_SPLIT,
|
||||
vec![list_type(flex(TVAR1)), nat_type(),],
|
||||
Box::new(SolvedType::Record {
|
||||
fields: vec![
|
||||
(
|
||||
"before".into(),
|
||||
RecordField::Required(list_type(flex(TVAR1)))
|
||||
),
|
||||
(
|
||||
"others".into(),
|
||||
RecordField::Required(list_type(flex(TVAR1)))
|
||||
),
|
||||
],
|
||||
ext: Box::new(SolvedType::EmptyRecord),
|
||||
},),
|
||||
);
|
||||
|
||||
// drop : List elem, Nat -> List elem
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_DROP,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue