我认为移除对 Maven 构建引用是一个好主意,以免其他人误入歧途,如果可能的话,甚至可以从仓库中提取。
经过一番调查,我终于让这个东西工作了(我想这是来自 spec-alpha2 的早期版本)
(defproject scratch "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/spec-alpha2 "0.2.177-SNAPSHOT"]
[org.clojure/test.check "0.9.0"]]
:repositories [["sonatype" {:url "
https://oss.sonatype.org/content/repositories/snapshots/"}]])
(ns scratch.core
(:require [clojure.spec-alpha2 :as sa2]
[clojure.spec-alpha2.gen :as gen]))
(sa2/def ::x (s/and-
(s/cat :i1 int? :i2 int?)
#(apply distinct? %)))
等等等等