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
Solaxun / my-cons.clj
Last active Aug 14, 2019
Clojure Cons Cell
View my-cons.clj
(def NIL (symbol "NIL"))
(deftype ConsCell [CAR CDR]
clojure.lang.ISeq
(cons [this x] (ConsCell. x this))
(first [this] (.CAR this))
;; next and more must return ISeq:
;; https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ISeq.java
(more [this] (if
(= (.CDR this) NIL)
@Solaxun
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]
[clojure.java.io :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.