parent
74b8ab62b2
commit
984237075a
|
@ -0,0 +1,5 @@
|
||||||
|
# This file was generated by Aiken
|
||||||
|
# You typically do not need to edit this file
|
||||||
|
|
||||||
|
requirements = []
|
||||||
|
packages = []
|
|
@ -0,0 +1,3 @@
|
||||||
|
name = 'aiken-lang/acceptance_test_066'
|
||||||
|
version = '0.0.0'
|
||||||
|
description = ''
|
|
@ -0,0 +1,25 @@
|
||||||
|
type Schema {
|
||||||
|
Integer(Int)
|
||||||
|
List(List<Schema>)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn sum(schema: Schema) -> Int {
|
||||||
|
when schema is {
|
||||||
|
Integer(i) -> i
|
||||||
|
List(xs) -> sum_list(xs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn sum_list(list: List<Schema>) -> Int {
|
||||||
|
when list is {
|
||||||
|
[] -> 0
|
||||||
|
[x, ..xs] -> sum(x) + sum_list(xs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test foo() {
|
||||||
|
False
|
||||||
|
// Can't enable the "real" test because it puts the UPLC evaluator in an infinite loop.
|
||||||
|
// -
|
||||||
|
// sum(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 10
|
||||||
|
}
|
Loading…
Reference in New Issue