Skip to content

Instantly share code, notes, and snippets.

@mudphone
Created October 28, 2015 13:34
Show Gist options
  • Save mudphone/170c0a38606ec6c958ff to your computer and use it in GitHub Desktop.
Save mudphone/170c0a38606ec6c958ff to your computer and use it in GitHub Desktop.
;;=> (var 0)
;;Traceback (most recent call last):
;; File "<input>", line 1, in <module>
;; File "<input>", line 4, in __init__
;;TypeError: object.__init__() takes no parameters
(defclass var [PSet]
[]
(defn --init-- [self c]
(.--init-- (super) self [c]))
;; (defn --new-- [self c]
;; (.--new-- (super) self (pmap {c True})))
(defn --str-- [self]
(% "(var %s)" (first self)))
(defn --repr-- [self]
(str self)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment