lean4-htt/tests/lean/run/expr1.lean
2019-10-21 10:49:01 -07:00

16 lines
366 B
Text

import Init.Lean.Expr
open Lean
def tst1 : IO Unit :=
do let f := Expr.const `f [];
let a := Expr.const `a [];
let b := Expr.const `b [];
let t := mkApp f #[a, b, b];
let as₁ := t.getAppArgs;
let as₂ := t.getAppRevArgs;
IO.println as₁;
IO.println as₂;
unless (as₁.reverse == as₂) $ throw "failed";
pure ()
#eval tst1