Add another failing example (e)
``` Error: × Main thread panicked. ├─▶ at crates/lang/src/uplc.rs:1518:45 ╰─▶ called `Option::unwrap()` on a `None` value help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace. ```
This commit is contained in:
parent
572121974e
commit
603f4a6385
|
@ -0,0 +1,2 @@
|
|||
name = "test_e"
|
||||
version = "0.0.0"
|
|
@ -0,0 +1,16 @@
|
|||
use aiken/builtin.{head_list}
|
||||
|
||||
pub fn head(xs: List<a>) -> Option<a> {
|
||||
when xs is {
|
||||
[] -> None
|
||||
_ -> Some(head_list(xs))
|
||||
}
|
||||
}
|
||||
|
||||
test head_1() {
|
||||
head([1, 2, 3]) == Some(1)
|
||||
}
|
||||
|
||||
test head_2() {
|
||||
head([]) == None
|
||||
}
|
Loading…
Reference in New Issue