mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Add List.concat
This commit is contained in:
parent
41662af399
commit
7ad4fb0e68
2 changed files with 10 additions and 0 deletions
|
@ -408,6 +408,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// concat : List elem, List elem -> List elem
|
||||
add_type(
|
||||
Symbol::LIST_CONCAT,
|
||||
SolvedType::Func(
|
||||
vec![list_type(flex(TVAR1)), list_type(flex(TVAR1))],
|
||||
Box::new(list_type(flex(TVAR1))),
|
||||
),
|
||||
);
|
||||
|
||||
// map : List before, (before -> after) -> List after
|
||||
add_type(
|
||||
Symbol::LIST_MAP,
|
||||
|
|
|
@ -640,6 +640,7 @@ define_builtins! {
|
|||
9 LIST_FOLDL: "foldl"
|
||||
10 LIST_FOLDR: "foldr"
|
||||
11 LIST_GET_UNSAFE: "getUnsafe" // TODO remove once we can code gen Result
|
||||
12 LIST_CONCAT: "concat"
|
||||
}
|
||||
7 RESULT: "Result" => {
|
||||
0 RESULT_RESULT: "Result" imported // the Result.Result type alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue