I think Alex's point was given any arbitrary function can be used as the 
conform part of the spec, this wouldn't be possible. Ie

boot.user=> (s/conform (s/conformer inc) 1)
2

On Saturday, June 18, 2016 at 10:35:10 AM UTC-7, Leon Grapenthin wrote:
>
> I am not sure whether I understand what you mean. 
>
> Behavior of conform for predicates is to return its return value if it is 
> logically true, ::s/invalid otherwise. Thus the predicate itself is the 
> spec to its conform*.
>
> s/conformer is only limiting as much as it is to unform, a user would have 
> to provide a spec for conforms result as well as he has to provide an 
> unform-fn if he wants unforming.
>
> If each spec implemented a conform-spec* method, a spec could very well 
> provide a spec of it's conform.
>
> On Saturday, June 18, 2016 at 5:03:33 PM UTC+2, Alex Miller wrote:
>>
>> Given that conform takes an arbitrary (opaque) function, I don't think 
>> that's generically possible.
>>
>>
>> On Saturday, June 18, 2016 at 7:37:33 AM UTC-5, Leon Grapenthin wrote:
>>>
>>> Assume I parse with conform. 
>>>
>>> Then I have functions that operate on the value returned by conform. I 
>>> want to spec them.
>>>
>>> But I can't get a spec for the value returned by conform (so that I can 
>>> spec said functions) automatically.
>>>
>>> Imagine `(s/conform-spec ::my-spec)` would return the spec of the 
>>> result of calling (s/confom ::my-spec foo)
>>>
>>> So it would probably be valuable if a spec could give a spec of what its 
>>> conform* returns`
>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to