Skip to content

Modification of exists? to return truthy value rather than a boolean. #7

Merged
merged 1 commit into from Sep 20, 2011

2 participants

@roblally

Hi,

I've made a small change to the exists? function, modifying it (and the associated tests) to return the component or nil rather than true/false - making use of clojure's notion of truthyness.

I've found it useful in testing, where I can assign the result to a temporary variable, asserting that it returned a component, and if that is successful diving into more detailed analysis of the component without having to re-query for it.

Hopefully you find this useful.

Thanks for all your hard work on the project - I've loved using it.

Rob.

@semperos semperos merged commit c5d46b4 into semperos:master Sep 20, 2011
@semperos
Owner

Makes sense. Thanks for taking the time to contribute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.