Details
-
Type:
Enhancement
-
Status:
In Progress
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: Approved Backlog
-
Component/s: None
-
Labels:None
-
Approval:Incomplete
Description
Support arbitrary functional destructuring, that is the use of
any function in any destructuring form to help unpack data in
arbitrary ways.
The discussion began here:
http://clojure-log.n01se.net/date/2009-11-17.html#09:31c
The attached patch implements the spec described here:
http://clojure-log.n01se.net/date/2009-11-17.html#10:50a
That is, the following examples would now work:
user=> (let [(-> str a) 1] a)
"1"
user=> (let [[a (-> str b) c] [1 2]] (list a b c))
(1 "2" nil)
user=> (let [(->> (map int) [a b]) "ab"] (list a b))
(97 98)
Activity
Stuart Halloway
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Reporter | Assembla Importer [ importer ] | |
| Priority | Minor [ 4 ] | |
| Approval | Test | Incomplete |
| Waiting On | richhickey |
Rich Hickey
made changes -
| Assignee | Rich Hickey [ richhickey ] | |
| Waiting On | richhickey |
Alexander Redington
made changes -
| Fix Version/s | Approved Backlog [ 10034 ] | |
| Fix Version/s | Release.Next [ 10038 ] |
Converted from http://www.assembla.com/spaces/clojure/tickets/211
Attachments:
destructuring-fns.diff - https://www.assembla.com/spaces/clojure/documents/aHWQ_W06Kr3O89eJe5afGb/download/aHWQ_W06Kr3O89eJe5afGb