{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreia56s3u7nhjv2mlqiixlfgh3f3jvwu5snhdjzkrqmnu5eykkqz3p4",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mfdtwhwljcp2"
},
"path": "/t/improving-memory-with-better-abstractions/12350?page=2#post_31",
"publishedAt": "2026-02-21T04:33:42.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"Each from lens",
"@Bit",
"@Byte",
"@Word64"
],
"textContent": "Thank you for putting it into formal language than I can muster!\n\nYes I did hem and haw about terminology a bit before settling on `endo` to emphasize the `(a -> a)` nature of `endomap`, but it is equally-well captured as a ‘monoid of equivalent / mapped (sub)types or something*’ slash as a category with composition eg `EndoMap Bit Byte <> EndoMap Byte Word64` yields `EndoMap Bit Word64` and `endomap @Bit . endomap @Byte . endomap @Word64`. Some famous quote about monoids in the category of endofunctors comes to mind about these things being related? We could also have described endomap in terms of `over each` using Each from lens.\n\n> * As I so would have tried to put it, which I know is Not a Well-Formed-Enough Statement, so again, thank you for putting it better than I would have\n\nI have been also considering the less loaded terms of `EndoMap`, `EndoFold`, `EndoTraverse` eg minus the `Functor/able` and just named after the primary function.",
"title": "Improving `memory` with better abstractions"
}