Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn build [list-1 list-2]
- (when-let [[x & xs] list-1]
- (concat (map #(list x %) list-2)
- (build xs list-2))))
- (defn build [list-1 list-2]
- (loop [result (list)
- [x & xs] list-1]
- (if x
- (recur (concat result (map #(list x %) list-2)) xs)
- result)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement