A more general case of some-?

2014-07-21 Thread Max Countryman
Hi, Recently I found myself wanting a macro similar to some- or some- but one where I could specify an arbitrary predicate instead of nil?. For example, I have a Ring request map which I wish to pass through a number of functions. Any of these functions might return an error response and if so

Re: A more general case of some-?

2014-07-21 Thread Leon Grapenthin
The predicate parameter introduces an additional predicate check on a per-step basis which can be avoided under most circumstances. If check-auth or check-balance return just their input value where that is valid, threading has no use here. They could be modified to only return something if

Re: A more general case of some-?

2014-07-21 Thread Linus Ericsson
Check out pedestals interceptors, they handle both error and pause/resume-request functionality. Seems you could have great use of it. Pedestal-service is the repo. pedestal.io /Linus On Monday, July 21, 2014, Leon Grapenthin grapenthinl...@gmail.com wrote: The predicate parameter introduces