We're updating the issue view to help you get more done. 

Add some?, when-some, if-some for (not (nil? x)) conditions

Description

Sometimes it is useful to have a form for non-nil conditions (as opposed to the existing logical true conditions).
Three additions to support this case:

  • some? - same as (not (nil? x))

  • if-some - like if-let, but checks (some? test) instead of test

  • when-some - like when-let, but checks (some? test) instead of test

Patch: clj-1343-4.patch

Environment

None

Status

Assignee

Unassigned

Reporter

Alex Miller

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.5

Priority

Major