Skip to content

Instantly share code, notes, and snippets.

@himerzi
himerzi / docprint.clj
Last active August 29, 2015 14:06 — forked from mhuebert/docprint.clj
(ns prndoc.core
(require
[clojure.core.strint :refer [<<]]
[clojure.core.match :refer [match]]))
(defn has-splat? [arglist]
((complement nil?) (first (last (split-with #(not= % '&) arglist)))))
(defn parse-arg-pattern
"Argument pattern [num-args has-splat?]. Pattern of [func & body] is [1 true]."