This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |