mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Add List.appendIfOk and List.prependIfOk
This commit is contained in:
parent
f0e3d65bc9
commit
e59d4e57c5
3 changed files with 41 additions and 2 deletions
|
@ -1941,7 +1941,12 @@ trait Backend<'a> {
|
|||
self.build_eq(sym, &args[0], &Symbol::DEV_TMP, &arg_layouts[0]);
|
||||
self.free_symbol(&Symbol::DEV_TMP)
|
||||
}
|
||||
Symbol::LIST_GET | Symbol::LIST_SET | Symbol::LIST_REPLACE | Symbol::LIST_APPEND => {
|
||||
Symbol::LIST_GET
|
||||
| Symbol::LIST_SET
|
||||
| Symbol::LIST_REPLACE
|
||||
| Symbol::LIST_APPEND
|
||||
| Symbol::LIST_APPEND_IF_OK
|
||||
| Symbol::LIST_PREPEND_IF_OK => {
|
||||
// TODO: This is probably simple enough to be worth inlining.
|
||||
let fn_name = self.lambda_name_to_string(
|
||||
func_name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue