diff --git a/examples/acceptance_tests/034/lib/tests.ak b/examples/acceptance_tests/034/lib/tests.ak index a215135f..110d7f90 100644 --- a/examples/acceptance_tests/034/lib/tests.ak +++ b/examples/acceptance_tests/034/lib/tests.ak @@ -5,6 +5,10 @@ pub fn foldr(self: List, with: fn(a, b) -> b, zero: b) -> b { } } +pub fn concat(left: List, right: List) -> List { + foldr(left, fn(x, xs) { [x, ..xs] }, right) +} + pub fn flat_map(self: List, with: fn(a) -> List) -> List { foldr(self, fn(x, xs) { concat(with(x), xs) }, []) }