[ALGOG-2] dispatch for fmap multimethod shouldn't be on type of second argument Created: 22/May/13 Updated: 22/May/13 |
|
| Status: | Open |
| Project: | algo.generic |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Minor |
| Reporter: | ben wolfson | Assignee: | Konrad Hinsen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
AFAICT having fmap dispatch on the type of the second argument makes it practically impossible to define fmap for arbitrary functions, since the type is different for each function: user> (type type) However, there's a perfectly reasonable definition of fmap for functions (fmap = comp). To my mind the simplest/best thing to do is just have a Functor protocol and have fmap call a function in it, with the order of arguments reversed so that dispatch will happen correctly. |
[ALGOG-1] Mention algo.generic.functor in README Created: 23/Nov/12 Updated: 23/Nov/12 |
|
| Status: | Open |
| Project: | algo.generic |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Trivial |
| Reporter: | Christoffer Sawicki | Assignee: | Konrad Hinsen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
All algo.generic submodules except for functor are mentioned in the README. Attached is a patch that rectifies this. |