hy/tests/native_tests/with_decorator.hy

13 lines
189 B
Hy
Raw Normal View History

(defn foodec [func]
(lambda [] (+ 1 1)))
(with-decorator foodec
(defn tfunction []
(* 2 2)))
(defn test-decorators []
"NATIVE: test decorators."
(assert (= (tfunction) 2)))