Add zero-arity versions of every-pred and some-fn

Description

Zero-arity versions of these fns are useful in situations like the following:

Approach: This patch adds zero-arity versions of every-pred and some-fn with these semantics:

Patch: 0001-Add-zero-arity-variants-for-every-pred-and-some-fn.patch

  • Patch adds zero-arity version

  • Patch reformats docstring to 80 character width (matching other core fns) - comments are identical other than the addition of a final sentence stating behavior with zero-arity.

Screened by:

Environment

None

Activity

Show:
Tassilo Horn
October 25, 2012, 1:12 PM

This is the thread where Max Penet suggested to have 0-arity versions of the two fns:

https://groups.google.com/forum/?fromgroups=#!topic/clojure/IRlN-4LH_U0

Alex Miller
November 8, 2013, 2:20 AM

Tassilo, can you undo the line break changes on this patch to minimize the patch differences?

Tassilo Horn
November 8, 2013, 10:00 AM

Rebased patch.

Tassilo Horn
November 8, 2013, 10:05 AM

@Alex: That I've reformatted the docstring so that it doesn't look like a comb and fits in 80 columns is a feature. Should I really revert to the original, ugly, less readable formatting only to make the patch 8 lines shorter?

Alex Miller
November 8, 2013, 3:14 PM

My goal was to simplify the patch so it is easier to review. Since the comment is identical (except for the last line), we can instead note that as a feature of the patch.

Assignee

Unassigned

Reporter

Tassilo Horn

Labels

None

Approval

Triaged

Patch

Code and Test

Priority

Minor
Configure