Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://4clojure.com/problem/122
- (fn [s]
- (loop [[d & t] s r 0]
- (case d
- \0 (recur t r)
- \1 (recur t (+ r (Math/pow 2 (count t))))
- r)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement