-
Notifications
You must be signed in to change notification settings - Fork 7
Map operation class #25
Copy link
Copy link
Open
Labels
bikeshedNamespace issuesNamespace issuesenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
bikeshedNamespace issuesNamespace issuesenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Functoronly applies to type constructors (Type u -> Type v). So, is insufficient for a general purposemap : (A -> B) -> CA -> CBwhere perhapsCAandCBcannot contain arbitrary element types.Example:
Functor ByteArraydoes not typecheck, even though we can givemap : (Byte -> Byte) -> ByteArray -> ByteArraySuggested implementation:
This conflicts with the current
Mapclass (which is the bag of associations abstraction commonly called aMapin other languages).We could
MapOp? Since we willexport MapOp (map)it will still be visible, but with the current naming scheme, theorems about map will end up in theMapOp.theorems_about_mapnamespace.MaptoMapBagor similar. I don't .. hate this solution? because it emphasizes the class's relationship toBag, but this goes against other languages with interfaces namedMap.