perl: Remove step 0.5.
[jackhill/mal.git] / hy / mal_types.hy
1 (import [types :as pytypes])
2
3 (defclass MalException [Exception]
4 (defn --init-- [self val] (setv self.val val)))
5
6 (defclass Atom []
7 (defn --init-- [self val] (setv self.val val)))
8
9 (defn clone [obj]
10 (if (= (type obj) pytypes.FunctionType)
11 (pytypes.FunctionType obj.__code__ obj.__globals__
12 :name obj.__name__
13 :argdefs obj.__defaults__
14 :closure obj.__closure__)
15 obj))