Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def qq [ 1 -1 3 4 -4 -5 6 -10 1345 -32 ] )
- (defn filter-neg[g]
- (if (neg? g)
- g))
- (filter-neg 3)
- (defn produce-with-fun[x prod-fun]
- (lazy-seq
- (when (seq x)
- (if-let [f (prod-fun (first x))]
- (cons f (red (rest x) prod-fun))
- (red (rest x) prod-fun)))))
- (produce-with-fun qq filter-neg)
Add Comment
Please, Sign In to add comment