Skip to content

Instantly share code, notes, and snippets.

@RedPenguin101
RedPenguin101 / cashflows.clj
Created June 13, 2020 13:39
Why is my instrument not working?
(ns cashflows
(:require [clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]))
(s/def ::date (s/inst-in #inst "1990" #inst "2050"))
(s/def ::amount number?)
(s/def ::cashflow (s/cat :date ::date :amount ::amount))
(s/exercise ::cashflow 5)