Skip to content

Instantly share code, notes, and snippets.

(defn tramp-fn [f]
(if (fn? f)
(fn [& args] #(apply f args))
f))
(defn tramp-fn2 [f]
(if (fn? f) (partial trampoline f) f))
(defmacro letrec [bindings & body]
(let [bcnt (quot (count bindings) 2)
@GeorgeJahad
GeorgeJahad / debug.clj
Created December 14, 2009 07:40 — forked from khinsen/debug.clj
yet another debug-repl fork
;; even more enhanced version with that allows ret val override and better prompt
;; Slightly enhanced version of Alex Osborne's debug-repl (http://gist.github.com/252421)
;; Typing () quits the debug REPL, making it possible to continue without terminating the
;; input stream by typing Ctrl-D.
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html
(ns clojure.contrib.debug
[:require clojure.main])