Skip to content

Instantly share code, notes, and snippets.

@logosity
Created April 27, 2012 20:56
Show Gist options
  • 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