Add new acceptance test scenario 038

This commit is contained in:
KtorZ 2023-01-06 06:46:15 +01:00
parent 3aba9baba5
commit 613fb3c957
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# This file was generated by Aiken
# You typically do not need to edit this file
requirements = []
packages = []

View File

@ -0,0 +1,2 @@
name = "aiken-lang/acceptance_test_038"
version = "0.0.0"

View 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])
}