Re-format and re-run all acceptance tests.

This commit is contained in:
KtorZ
2024-01-20 10:43:17 +01:00
parent 9ee2d58ba3
commit b50e4ab63a
77 changed files with 449 additions and 830 deletions

View File

@@ -1,9 +1,7 @@
pub fn foldr(xs: List<a>, f: fn(a, b) -> b, zero: b) -> b {
when xs is {
[] ->
zero
[x, ..rest] ->
f(x, foldr(rest, f, zero))
[] -> zero
[x, ..rest] -> f(x, foldr(rest, f, zero))
}
}
@@ -12,8 +10,7 @@ pub fn filter_map(xs: List<a>, f: fn(a) -> Option<b>) -> List<b> {
xs,
fn(x, ys) {
when f(x) is {
None ->
ys
None -> ys
Some(y) ->
[y, ..ys]
}