Created
April 27, 2012 20:56
-
-
Save logosity/2513151 to your computer and use it in GitHub Desktop.
Get this code running and you'll have everything you need...
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
(use '[clojure.string :only (join)]) | |
(use '[clojure.data.json :only (read-json)]) | |
(defmacro google [& terms] | |
`(map :url | |
(get-in (read-json (slurp (str "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=" | |
~(join \+ (map str terms))))) [:responseData :results]))) | |
(google learning clojure) | |
(google learning clojure eclipse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment