Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn pls1 [x]
- (+ 1 x))
- (defn pls2 [x]
- (+ 2 x))
- (defn doit []
- (map (fn [i f]
- (f i))
- '(1 2 3 4 5)
- (cycle '(pls1 pls2))))
- ;produces (nil nil nil nil nil)
- (defn doit []
- (map (fn [i f]
- (pls2 i))
- '(1 2 3 4 5)
- (cycle '(pls1 pls2))))
- ;produces (3 4 5 6 7)
- (defn doit []
- (map (fn [i f]
- (+ 1 i))
- '(1 2 3 4 5)
- (cycle '(pls1 pls2))))
- ;produces (2 3 4 5 6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement