[CTYP-73] Support reduced, reduced? and @ of reduced items. Created: 29/Sep/13 Updated: 09/Oct/13 Resolved: 09/Oct/13
|Reporter:||Julian Birch||Assignee:||Ambrose Bonnaire-Sergeant|
Not sure if this is a defect or enhancement, but there doesn't seem to be any support for reduced.
Arguably, the type declaration of reduce is wrong at the moment, and should be something like
[[a c -> (U a (Reduced a))] (NonEmptySeqable c) -> (U a (Reduced a))]
And I'd like to be able to type check the following
(let [v (reduce f coll)]
|Comment by Ambrose Bonnaire-Sergeant [ 09/Oct/13 8:08 PM ]|
|Comment by Ambrose Bonnaire-Sergeant [ 09/Oct/13 8:09 PM ]|
As a side note, your last usage of reduced is probably not what you meant, as reduce unwraps one layer of reduced.