clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
bertofer 2020-03-27T00:00:56.013700Z

yeah on a second thought itโ€™s not very useful

bertofer 2020-03-27T00:26:32.013900Z

Also because it would only apply to spec from simple predicates, not other types of specs

alexmiller 2020-03-27T00:34:53.014100Z

it already does what you're asking, unless I misunderstand what you're asking

2020-03-27T21:59:41.017300Z

https://gist.github.com/hiredman/60e5e6f0025cb38c8a7739d21f5a8ce6 is a little thing I've been toying with for using spec to define and check stateful protocols, meaning it defines how a client and server communicate, and certain client requests are only valid when the server is in certain states. given such a definition you stick it between your client and server and it checks the communication back and forth and gives errors if either side violates the protocol.

๐Ÿ‘ 1