incorrect typing for group-by

Description

It seems that group-by is incorrectly annotated. For example:

(cf (group-by even? [1 2 2]))

will return

(Map Boolean (U (Val 1) (Val 2)))

However the group-by operation returns

{false [1], true [2 2]}

so I think the type should be:

(Map Boolean (Vec (U (Val 1) (Val 2))))

Environment

Using 0.2.80

Activity

Show:
Reno Reckling
February 28, 2015, 2:22 AM

Patch to solve this.
Sorry, did not see the upload button on my first comment...

Ambrose Bonnaire-Sergeant
March 3, 2015, 4:34 PM

Reno, I think you need to set an email for your local git.

Fixed https://github.com/clojure/core.typed/commit/78f4b5d58d712d9b67738a807aadcec641638078

Completed

Assignee

Ambrose Bonnaire-Sergeant

Reporter

import

Labels

None

Approval

None

Patch

None

Affects versions

Priority

Major
Configure