-
-
Notifications
You must be signed in to change notification settings - Fork 370
Description
./zig-out/bin/roc file.roc
app [main!] { pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.6/2BfGn4M9uWJNhDVeMghGeXNVDFijMfPsmmVeo6M4QjKX.tar.zst" }
compress : List(a) -> List(a) where [a.is_eq : a, a -> Bool]
compress = |l| {
match l {
[] => []
[e] => [e]
[e1, e2, .. as rest] => {
rest_compression = compress(List.concat([e2], rest))
if e1 == e2 { rest_compression } else { List.concat([e1], rest_compression) }
}
}
}
main! = |_| {
_a = compress([1, 2])
Ok({})
}
Roc crashed: e_call: func is neither closure nor lambda
Note: removing the function type annotation avoids this issue.
Reactions are currently unavailable