Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmulti apply-expression
- (fn [expr c]
- (if (coll? c)
- :coll
- :default)))
- (defmethod apply-expression :coll
- [expr c]
- "stub")
- (defmethod apply-expression :default
- [expr c]
- (let [% (read-string c)]
- (eval (read-string expr))))
- (apply-expression "(+ % 1)" "1")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement