Skip to content

Instantly share code, notes, and snippets.

@pcomans
Created July 27, 2011 20:09
Show Gist options
  • Save pcomans/1110254 to your computer and use it in GitHub Desktop.
Save pcomans/1110254 to your computer and use it in GitHub Desktop.
(ns lang-map
(:use [clojure.data.json :only (json-str write-json read-json)]))
(defn wiki-lookup [word]
(let [query (str "http://en.wikipedia.org/w/api.php?action=opensearch&search=" word "&namespace=0&format=json")]
(read-json (slurp query))))
(wiki-lookup "Scheme")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment