In the Perl 6 world, currying is an universal term indicating partial instantiation, and it's also used in the world of (parametrized) roles.
However, it's not clear how to actually use it:
role Zipi[::T] {};
class Zape does Zipi[::T] {}
errors with No such symbol T
; same if we use simply T
when declaring the class, but in this case it's Undeclared name
. Eliminating the square brackets and its content yields No appropriate parametric role variant available for 'Zipi'
, same as leaving the square brackets empty. There seems to be a (kinda) bug report going back to 2012, and of course these examples are taken directly from the source code of CurriedRolehow.
Any idea of how this would eventually work or if it's possible to curry parametrized roles by instantiating only some of their parameters?