Skip to content

Instantly share code, notes, and snippets.

Mark Woodworth Solaxun

  • First Republic Bank
  • San Francisco
Block or report user

Report or block Solaxun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Solaxun / ibid.clj
Created Dec 5, 2019
ibid clojure - from Gene Kim's interview on the Functional Geekery podcast.
View ibid.clj
;; couldn't resist after hearing the podcast...
(defn ibid [coll]
(reduce (fn [res cur]
(if (= cur "ibid")
(conj res (last res))
(conj res cur)))
[(first coll)]
(rest coll)))
Solaxun / my-cons.clj
Last active Aug 14, 2019
Clojure Cons Cell
View my-cons.clj
(def NIL (symbol "NIL"))
(deftype ConsCell [CAR CDR]
(cons [this x] (ConsCell. x this))
(first [this] (.CAR this))
;; next and more must return ISeq:
(more [this] (if
(= (.CDR this) NIL)
Solaxun / day13.clj
Created Dec 15, 2018
2018 Advent of Code Day 13
View day13.clj
(ns aoc2018-clj.day13
(:require [clojure.string :as str]
[ :as io]
[clojure.math.combinatorics :as combs]
[clojure.set :as set]))
(def track (str/split-lines (-> "day13.txt" io/resource slurp)))
(def race-track (mapv vec track))
(defn intersection-rule [{:keys [loc dir turn-count] :as car}]
You can’t perform that action at this time.