Add new acceptance test scenario 038
This commit is contained in:
parent
3aba9baba5
commit
613fb3c957
|
@ -0,0 +1,5 @@
|
|||
# This file was generated by Aiken
|
||||
# You typically do not need to edit this file
|
||||
|
||||
requirements = []
|
||||
packages = []
|
|
@ -0,0 +1,2 @@
|
|||
name = "aiken-lang/acceptance_test_038"
|
||||
version = "0.0.0"
|
|
@ -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])
|
||||
}
|
Loading…
Reference in New Issue