Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created June 30, 2011 00:57
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 swannodette/1055402 to your computer and use it in GitHub Desktop.
Save swannodette/1055402 to your computer and use it in GitHub Desktop.
cps.clj
(ns clj-play.cps)
(defn a [i0 k0]
(fn [k]
(k (k0 [i0]))))
(defn b [in kn]
(fn [k]
(k (kn (fn [v] (conj v in))))))
(comment
((b 2 (a 1 identity)) identity) ;; [1 2]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment