Re:Monads are monoids in the category of endofunctors
by lmm on Thursday September 09, 2021 @10:32PM
(#28477137)
Not quite - the type constructor is the thing that does the same thing with the types themselves, not with Class (which is sort-of-but-not-really a way to represent types as values). In Java or C# there's no way to actually represent a type constructor (e.g. you can't have a class that takes a type parameter F that could be List or Set, and then you use that type to form F<String> within the class itself and it will be List<String> or Set<String> depending on whether you do new MyClass<List> or new MyClass<Set>), but other languages are more powerful in what they let you do with types. Look up "higher-kinded types" for the general concept.
Class<List<String>> thisistypeconstructor(Class<String> strClass)
And if I generify the types above, maybe something like
<OutputType> thisistypeconstructor(<InputType>)