Created
January 30, 2011 02:50
-
-
Save nick-orton/802468 to your computer and use it in GitHub Desktop.
remove the top element if predicate matches
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
(defn pop-if | |
[predicate stack] | |
(if (predicate (first stack)) | |
(rest stack) | |
stack)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment