coincidentally, me and my brother wrote this while on the train to
rubyconf last year:

https://github.com/mikejones/mississippi

havent put any docs or anything on there (its only a couple of
functions), but is essentially a validation function that take a map
(the thing to validate) and another map (the validations to apply) and
returns the original map with an :errors map assoc'd to it. comes with
a couple of pre-baked  validation functions, but not many.

works pretty well for the use cases i currently have... *shrug*

On Tue, Apr 12, 2011 at 7:53 PM, James Reeves <jree...@weavejester.com> wrote:
> On 12 April 2011 22:04, Joost <jo...@zeekat.nl> wrote:
>> For now, I think of the pretzel library as the lowest useful level of
>> abstraction for input tests. And for low level abstractions, I prefer
>> to place a higher value on correctness, extensibility, consistency and
>> possibly even performance (in roughly that order) than ease of use
>> from a direct programmer's stand point.
>
> I think I agree.
>
>> It might be better to put those predicates in a numeric
>> namespace or library that doesn't address strings at all, maybe
>> relying on a conversion layer somewhere if your input is really string-
>> based, or maybe to have string-based counterparts relying on the
>> numeric tests.
>
> That's a good idea. Perhaps something like:
>
>  (defn from-string [f]
>    (comp f parse-number))
>
>  (from-string (in-range 1 10))
>
> But with a better name than "from-string".
>
> - James
>
> --
> 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 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

Reply via email to