Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
| (ns weighted-rand | |
| (:import clojure.lang.PersistentQueue)) | |
| (defprotocol Rand | |
| (nextr [_ rng])) | |
| ;; Vose's alias method | |
| ;; http://www.keithschwarz.com/darts-dice-coins/ | |
| (deftype Vose [n ^ints alias ^doubles prob] |
| OSProcess thisOSProcess environment |