On Thu, May 26, 2016 at 1:47 PM, Sean Corfield <s...@corfield.org> wrote:
[snip]
> A pattern that I’ve also started using is something like this:
>
> (defn guarded-process [data]
>   (some-> data
>           first-guard
>           second-guard
>           (another-guard :with “parameters”)
>           (process-the-data 1 2 3 4)))
>
> That works well for a process that operates on non-nil data and then you 
> write the guards to return the data if it’s valid or nil if it isn’t.

You know, I know about half of the threading macros well, but I
haven't touched some->.  It seems like a really good fit for some
problems I'm facing.  Thank you for the suggestion!

-John

-- 
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