I'm writing a function that takes a sequence of Triangles (which are in fact represented as maps).
My spec is :
(s/fdef triangle-list-to-pattern
:args (s/cat :trs (s/* ::maths/Triangle))
)
And the function takes a single argument, trs which is a sequence of Triangles.
However, when I instrument this function and call it I get the following failure :
fails spec: :patterning.maths/Triangle at: [:args :trs] predicate: map?
If I explicitly test the argument I'm passing to the function with spec, it passes. It really is just a sequence of things that meet the Triangle criteria.
The function seems to be working. The argument seems to be correct, and passes the spec when tested separately. So I presume I'm getting the fdef wrong somehow.
What's the problem?
Note, ::Triangle is defined :
(s/def ::Triangle (s/keys :req-un [::A ::B ::C ::a ::b ::c ::ax ::ay ::bx ::by ::cx ::cy]))