This commit is contained in:
microproofs 2024-01-23 16:01:53 -05:00 committed by Kasey
parent 36a0b317ad
commit dc61e11813
1 changed files with 12 additions and 6 deletions

View File

@ -4270,17 +4270,23 @@ fn expect_head_discard_tail() {
assert_uplc(
src,
Term::var("a")
.delayed_choose_list(
Term::Error.delayed_trace(Term::var("expect[h,..]=a")),
Term::equals_integer()
.apply(Term::var("h"))
.apply(Term::var("h"))
.lambda("h")
.apply(Term::un_i_data().apply(Term::head_list().apply(Term::var("a"))))
.apply(Term::un_i_data().apply(Term::head_list().apply(Term::var("a")))),
)
.lambda("a")
.apply(Term::list_values(vec![
Constant::Data(Data::integer(1.into())),
Constant::Data(Data::integer(2.into())),
Constant::Data(Data::integer(3.into())),
])),
]))
.lambda("expect[h,..]=a")
.apply(Term::string("expect [h, ..] = a")),
false,
);
}