roc/compiler/builtins/bitcode/src
ayazhafiz f65b174ab5 Implement List.find
`List.find : List elem, (elem -> Bool) -> Result elem [ NotFound ]*`
behaves as follows:

```
>>> List.find [1, 2, 3] (\n -> n > 2)
Ok 2
>>> List.find [1, 2, 3] (\n -> n > 4)
Err NotFound
```

We implement this as builtin in two phases. First, we call out to a
pure-llvm-lowlevel `ListFindUnsafe` that returns a record indicating
whether a satisfying element was found, and the value of that element
(the value is all null bytes if the element wasn't found). Then, we lift
that record to a `Result` via a standard construction of the can AST.

Closes #1909
2021-11-08 21:03:14 -05:00
..
helpers fix: all tests need to use try now 2021-06-06 00:50:52 -04:00
dec.zig Merge branch 'add-dec-types' of https://github.com/rtfeldman/roc into add-dec-types 2021-07-18 14:13:59 -07:00
dict.zig make things compile, base64 has a memory leak 2021-10-06 22:57:11 +02:00
hash.zig update zig to compile on nightly 2021-08-23 21:41:13 +02:00
list.zig Implement List.find 2021-11-08 21:03:14 -05:00
main.zig Implement List.find 2021-11-08 21:03:14 -05:00
num.zig hook up polymorphic zig builtins 2021-10-20 16:43:39 +02:00
str.zig Merge branch 'trunk' into fix-str-from-int 2021-11-07 00:00:21 +01:00
utils.zig Correct minor spelling mistakes 2021-11-06 15:29:08 +01:00