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
#!/usr/bin/env bb | |
;; Ported from https://gist.github.com/pyr/d5e17af9c572b681a57de52895437298 to babashka | |
;; klein aims to be a small joker script to mimick | |
;; most of leiningen's default behavior while minimizing | |
;; divergence from standard facilities provided by | |
;; tools.deps | |
;; This is built as a single file script to simplify | |
;; deployment and will avoid requiring any code beyond |
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
;; the SET game in clojure.spec | |
;; inspired by https://github.com/jgrodziski/set-game | |
(require '[clojure.spec :as s]) | |
(s/def ::shape #{:oval :diamond :squiggle}) | |
(s/def ::color #{:red :purple :green}) | |
(s/def ::value #{1 2 3}) | |
(s/def ::shading #{:solid :striped :outline}) | |
(s/def ::card (s/keys :req [::shape ::color ::value ::shading])) |