Skip to content

Instantly share code, notes, and snippets.

View barak's full-sized avatar

Barak A. Pearlmutter barak

View GitHub Profile
(ns newton-raphson.core)
;;utility function for list manipulation
(defn keep-list [expr]
(if (and (coll? expr) (not (= 1 (count expr)))) (list expr) expr))
(defn to-list [expr]
(cond (list? expr) expr
(coll? expr) (seq expr)