It was not. It was implemented by Dylan Taylor, an outside contributor who works at a fintech company in North Carolina, and has made it his hobby to submit PRs implementing age verification to all kinds of projects. The systemd maintainer who clicked "merge" (Luca Boccassi) does work at Microsoft.
I would love to understand his motives, because my first impression is not a positive one. This is not freedom-loving behavior of a patriotic US citizen.
type IntBox struct { v int }
type StrBox struct { v string }
func (b IntBox) MapToStr(f func(int) string) StrBox {
return StrBox{v: f(b.v)}
}
(Please forgive any typos I made on mobile.)
It wasn't a great example because "Box" isn't really a useful type. But the point is that you no longer need to define a separate "MapToXXX" method for every type you might want to map to; now you can have just one type-generic "Map" method.
It is very close to one. My Option[T] type [1] cannot have a Map method in stable Go because of the type system restriction in question. Instead, I have a separate package with freestanding functions with the same purpose, including Map [2].
I'm surprised to see that it's OK that he has opensource AHB/APB stuff in it--I'd avoided learning them too much about them assuming that they were ARM proprietary.