Created
March 14, 2012 02:25
-
-
Save mikebridge/2033514 to your computer and use it in GitHub Desktop.
Codelesson Clojure Assignment 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns codelesson.assignment-1) | |
;; Write a function called map-while which accepts a function f, a sequence s, and a predicate pred. When applied, it collects the results of applying f to s as long as applying pred to elements returns true. | |
(defn map-while [f s pred] | |
(map f (take-while pred s))) |
Author
mikebridge
commented
Mar 14, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment