What's the 'right' way to spec relationship between values in a sequence? 
 For example, the following spec defines a sequence of number in increasing 
order:
>
>
>
> (s/conform (s/and (s/coll-of number?)
>                   #(->> %
>                         (partition 2 1)
>                         (map (fn [[a b]] (< a b)))
>                         (every? true?)))
>            [1 2 3])
>
> It feels like there ought to be a more elegant solution - especially as 
the relationships become more complex.  Is there another approach?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to