Add new acceptance test scenario 038
This commit is contained in:
5
examples/acceptance_tests/038/aiken.lock
Normal file
5
examples/acceptance_tests/038/aiken.lock
Normal file
@@ -0,0 +1,5 @@
|
||||
# This file was generated by Aiken
|
||||
# You typically do not need to edit this file
|
||||
|
||||
requirements = []
|
||||
packages = []
|
||||
2
examples/acceptance_tests/038/aiken.toml
Normal file
2
examples/acceptance_tests/038/aiken.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
name = "aiken-lang/acceptance_test_038"
|
||||
version = "0.0.0"
|
||||
21
examples/acceptance_tests/038/lib/tests.ak
Normal file
21
examples/acceptance_tests/038/lib/tests.ak
Normal file
@@ -0,0 +1,21 @@
|
||||
pub fn and(self: List<Bool>) -> Bool {
|
||||
when self is {
|
||||
[] -> True
|
||||
[x, ..xs] -> x && and(xs)
|
||||
}
|
||||
}
|
||||
|
||||
test and_1() {
|
||||
and([True, True])
|
||||
}
|
||||
|
||||
pub fn or(self: List<Bool>) -> Bool {
|
||||
when self is {
|
||||
[] -> False
|
||||
[x, ..xs] -> x || or(xs)
|
||||
}
|
||||
}
|
||||
|
||||
test or_1() {
|
||||
or([True, True])
|
||||
}
|
||||
Reference in New Issue
Block a user