Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn mapset [func ele]
- (loop [elements ele
- result []]
- (if (empty? elements)
- (set result)
- (let [[first-value & another] elements]
- (into result (func first-value))
- (recur another result)))))
- (def v [1 2 3 4 5])
- (mapset + v)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement