Skip to content

Commit

Permalink
Simplify hack to create PSet subclass (var)
Browse files Browse the repository at this point in the history
  • Loading branch information
mudphone committed Oct 28, 2015
1 parent 5a25904 commit 27c7c5d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mu.hy
Expand Up @@ -38,13 +38,10 @@
;; Variables "are represented as vectors that hold their variable index."
(defclass var [PSet]
[]
(defn --init-- [self c]
(.--init-- (super))
(setv self._map (pmap {c True}))
None)
(defn --new-- [self c]
(.--new-- (super) self (pmap {c True})))

(defn --str-- [self]
;; (% "_.%s" (first self))
(% "(var %s)" (first self)))

(defn --repr-- [self]
Expand Down

0 comments on commit 27c7c5d

Please sign in to comment.