lean4-htt/tests/lean/run/inline_fn.lean

15 lines
192 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def f {α : Type} [HasAdd α] (x : α) :=
x + x + x
def h : Nat → Nat
| 0 := 10
| (n+1) := n * h n
def g1 (x : Nat) :=
inline f x
def g2 (x : Nat) :=
inline h x
def g3 :=
inline h 2