2020-05-31 03:36:54 +03:00
|
|
|
import Language.Reflection
|
|
|
|
|
|
|
|
%language ElabReflection
|
|
|
|
|
|
|
|
powerFn : Nat -> TTImp
|
|
|
|
powerFn Z = `(const 1)
|
|
|
|
powerFn (S k) = `(\x => mult x (~(powerFn k) x))
|
|
|
|
|
|
|
|
cube : Nat -> Nat
|
2020-05-31 16:33:34 +03:00
|
|
|
cube = %runElab check (powerFn 3)
|