Clojure

Add default predicate argument to filter, every?, take-while

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Some seq processing functions that take predicates could be improved by the addition of a default value of identity for the predicate argument.

This has been discussed on the mailing list, and people seem favorable:
http://groups.google.com/group/clojure/browse_thread/thread/600559b7ee261908/3bc5d144ac54854e?lnk=gst&q=filter+identity#3bc5d144ac54854e
http://groups.google.com/group/clojure-dev/browse_thread/thread/0a9b5750dd7ec4ca

I can put together a patch.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/450
Hide
Jason Orendorff added a comment -

I independently wanted this. Here's a patch for: some, not-any?, every?, not-every?. If this is roughly what's wanted I'll be happy to add filter, remove, take-while, drop-while.

Show
Jason Orendorff added a comment - I independently wanted this. Here's a patch for: some, not-any?, every?, not-every?. If this is roughly what's wanted I'll be happy to add filter, remove, take-while, drop-while.
Hide
Jason Orendorff added a comment -

Note that there are a few cases of (every? identity ...) and (some identity ...) in core.clj itself; the patch removes "identity" from those.

Show
Jason Orendorff added a comment - Note that there are a few cases of (every? identity ...) and (some identity ...) in core.clj itself; the patch removes "identity" from those.
Hide
Andy Fingerhut added a comment -

clj-450-add-default-pred-arg-to-core-fns-patch.txt dated Apr 26 2012 is identical to Jason Orendorff's, except it is in git format. Jason is not on the list of Clojure contributors as of today. I have sent him an email asking if he has done so, or is planning to.

Show
Andy Fingerhut added a comment - clj-450-add-default-pred-arg-to-core-fns-patch.txt dated Apr 26 2012 is identical to Jason Orendorff's, except it is in git format. Jason is not on the list of Clojure contributors as of today. I have sent him an email asking if he has done so, or is planning to.
Hide
Jason Orendorff added a comment -

Of course I'd be happy to send in a contributor agreement. ...Is there actually any interest in taking this patch or something like it?

Show
Jason Orendorff added a comment - Of course I'd be happy to send in a contributor agreement. ...Is there actually any interest in taking this patch or something like it?
Hide
Andy Fingerhut added a comment -

I don't know if there is any interest in taking this patch. Perhaps a Clojure screener will take a look at it and comment, but I am not a screener and can't promise anything.

Show
Andy Fingerhut added a comment - I don't know if there is any interest in taking this patch. Perhaps a Clojure screener will take a look at it and comment, but I am not a screener and can't promise anything.
Hide
Kevin Downey added a comment -

it doesn't seem productive to dance around: "I'll send in a ca, if you agree to take my patch" "We might take your patch but first send in a ca"

if there is no signed ca I think the patch should be removed from jira

Show
Kevin Downey added a comment - it doesn't seem productive to dance around: "I'll send in a ca, if you agree to take my patch" "We might take your patch but first send in a ca" if there is no signed ca I think the patch should be removed from jira
Hide
Alex Miller added a comment -

Generally, I do not look at patches from people that have not signed a CA in case I need to write a patch later that is "clean".

Show
Alex Miller added a comment - Generally, I do not look at patches from people that have not signed a CA in case I need to write a patch later that is "clean".

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (2)

Dates

  • Created:
    Updated: