partial function should also accept 1 arg (just f)

Description

The partial function should accept just a function. This allows it to be properly used with apply.

E.g. This breaks (but shouldn't) if args are nil: (apply partial f args)

Environment

None

Attachments

2

Activity

Fogus August 15, 2012 at 4:47 PM

Original patch is trivial, but did not have a test. I added a test as a separate patch file.

Fogus August 15, 2012 at 4:45 PM

Attached a patch adding a test for this ticket.

Michel Alexandre Salim June 13, 2012 at 11:18 AM

Attached patch makes partial just returns f if called with only one argument. Not sure if this will have a performance impact or not; a Clojure/core member would probably be able to better judge if the use cases outweigh any performance hit.

Completed

Details

Assignee

Reporter

Approval

Patch

Priority

Affects versions

Fix versions

Created June 12, 2012 at 8:28 PM
Updated August 18, 2012 at 1:12 PM
Resolved August 18, 2012 at 1:12 PM