Skip to content

Instantly share code, notes, and snippets.

@logosity
Created April 27, 2012 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logosity/2513151 to your computer and use it in GitHub Desktop.
Save logosity/2513151 to your computer and use it in GitHub Desktop.
Get this code running and you'll have everything you need...
(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