Skip to content

Instantly share code, notes, and snippets.

View arwagner's full-sized avatar

Andrew Wagner arwagner

  • Northern Virginia
View GitHub Profile
@avescodes
avescodes / Editing Clojure with Emacs
Last active July 5, 2022 13:32
Get started editing Clojure in Emacs with this basic config.
Check out README.md to get started editing Clojure with Emacs.
@pitosalas
pitosalas / gist:5454177
Created April 24, 2013 18:06
This is a simple bit of code that I think is ugly. I am looking for a suggestion on making it more idiomatic. Thanks!
def populate_todolist
progs = @user.participating_programs
@to_do_list = progs.map { |prog| build_todolist_row(prog) }
@to_do_list.compact!
end
# return nil if analysis yields no todolist row. compact! above removes the nil.
def build_todolist_row prog
rounds = prog.open_rounds
raise "more than one round open in ToDoList" if rounds.length > 1