Add macroexpand to core/language.hy
This commit is contained in:
parent
80feaf57fc
commit
a34db9119b
@ -119,6 +119,11 @@
|
|||||||
(try (= x (iter x))
|
(try (= x (iter x))
|
||||||
(catch [TypeError] false)))
|
(catch [TypeError] false)))
|
||||||
|
|
||||||
|
(defn macroexpand [form]
|
||||||
|
"Return the macro expansion of form"
|
||||||
|
(import hy.macros)
|
||||||
|
(hy.macros.macroexpand form --name--))
|
||||||
|
|
||||||
(defn neg? [n]
|
(defn neg? [n]
|
||||||
"Return true if n is < 0"
|
"Return true if n is < 0"
|
||||||
(_numeric-check n)
|
(_numeric-check n)
|
||||||
@ -212,9 +217,8 @@
|
|||||||
(_numeric_check n)
|
(_numeric_check n)
|
||||||
(= n 0))
|
(= n 0))
|
||||||
|
|
||||||
(def *exports* ["cycle" "dec" "distinct" "drop" "drop_while" "empty?"
|
(def *exports* ["cycle" "dec" "distinct" "drop" "drop_while" "empty?" "even?"
|
||||||
"even?" "filter" "float?" "inc"
|
"filter" "float?" "inc" "instance?" "integer?" "iterable?"
|
||||||
"instance?" "integer?" "iterable?" "iterate" "iterator?" "neg?"
|
"iterate" "iterator?" "macroexpand" "neg?" "none?" "nth"
|
||||||
"none?" "nth" "numeric?" "odd?" "pos?" "remove" "repeat"
|
"numeric?" "odd?" "pos?" "remove" "repeat" "repeatedly"
|
||||||
"repeatedly" "second" "string?" "take" "take_nth" "take_while"
|
"second" "string?" "take" "take_nth" "take_while" "zero?"])
|
||||||
"zero?"])
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user