Skip to content

Instantly share code, notes, and snippets.

@RedPenguin101
RedPenguin101 / cashflows.clj
Created Jun 13, 2020
Why is my instrument not working?
View cashflows.clj
(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)