Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Gunnarson alexandergunnarson

View GitHub Profile
View keybase.gist
### Keybase proof
I hereby claim:
* I am alexandergunnarson on github.
* I am agunnarson (https://keybase.io/agunnarson) on keybase.
* I have a public key ASCvCVZJHmaDqh7ru9Iu93H0RRjSJL3iMqwtQQZKVYecQgo
To claim this, I am signing this object:
View lambda_calculus.clj
(ns quantum.lambda-calculus)
(defmacro λ [arg ret] `(fn [~arg] ~ret))
(def ^{:doc "Whatever function `f` you pass in, called on itself (composed) `n` times."}
NUM (λ n (λ f (λ x ((apply comp (repeat n f)) x)))))
(def I (λ x x)) ; `identity`
(def K (λ x (λ y x))) ; `firsta`
View immutable_trie.cljc
(ns alexandergunnarson.immutable-trie)
(defrecord TrieNode
[val complete? a b c d e f g h i j k l m n o p q r s t u v w x y z])
(defn node
([val] (node val false))
([val complete?]
(TrieNode. val complete?
nil nil nil nil nil
You can’t perform that action at this time.