Skip to content

Instantly share code, notes, and snippets.

View rsachdeva's full-sized avatar

Rohit Sachdeva rsachdeva

View GitHub Profile
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:
@rsachdeva
rsachdeva / todo-tasks-lists-summer-holidays.clj
Created June 14, 2013 14:58
todo list (in clojure) for kids summer holidays tasks entered dynamically on command line!
(defn todo-prompt [question]
(println question)
(read-line))
;mutable with atom and swap!
(def todos (atom {}))
(defn todo-details [todos]
(let [task-code (todo-prompt "Task code?")