Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn pars [str]
- (if (boolean (re-find #"\+" str))
- (let [xp (split str #"\+" 2)]
- (+ (pars (first xp)) (pars (first (rest xp))))
- )
- (if (boolean (re-find #"\-" str))
- (let [xp (split str #"\-" 2)]
- (- (pars (first xp)) (pars (first(rest xp))))
- )
- (read-string str)
- )
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement