This file contains hidden or 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
// -------------------------------------------------------------- | |
// change these input values | |
// path: what oak path to show | |
def path = "/oak:index/nodetype/:index"; | |
// depth: how deep the tree structure should be rendered | |
def depth = 2; | |
// -------------------------------------------------------------- |
This file contains hidden or 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
;; try this form-by-form at a REPL | |
(require '[clojure.spec.alpha :as s]) | |
;; create an inline DSL to describe the FizzBuzz world | |
(defmacro divides-by | |
[nm n] | |
`(s/def ~nm (s/and pos-int? #(zero? (mod % ~n))))) | |
;; specify FizzBuzz | |
(divides-by ::fizz 3) |
OlderNewer