blob: 94139c49f2fdb6d39cdb0ae7f2b0040eb0c7bc26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
app "roctorrent"
packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.5.0/Cufzl36_SnJ4QbOoEmiJ5dIpUxBvdB3NEySvuH82Wio.tar.br" }
imports [pf.Stdout]
provides [main] to pf
bDecodeStr: List U8 -> Result (List U8) [Malformatted]
bDecodeStr = \i ->
List.splitFirst i ':'
|> Result.mapErr \_err -> Malformatted
|> Result.map \{before, } -> before
expect
res = bDecodeStr (Str.toUtf8 "foo")
res == Err Malformatted
main =
Stdout.line "Hello, World"
|