接口 Functor
- 所有已知子接口:
Functor01<A>
,Functor02<R,
,A> Functor1$10<R,
,A, B, C, D, E, F, G, H, I, J> Functor10<R>
,Functor11<R,
,A> Functor12<R,
A, B>
public interface Functor
Functor
This mixin provides and verification that the inheriting class or interface is of a functor type.
Functors are marked by their 2 digit code at the end usually in a format like
FunctorXX
where XX denotes the two numbers. However, there
are symbols that are used. For example "?" which is used to denoted the use of an
Optional
and is found commonly in the return type.
Number code
The two digit number code have great significance on how they reveal what that functor should be used for. An example could beFunctor?12
which represents a function that has a singular
Optional
return type along with 2 parameters.
First Digit
This represents how many return values are returned by that function. Usually it
is between 0 or 1.
Second Digit
This represents how many parameters are expected and usually does not have any
symbols representing it.
Oh no! My functor needs to have 30 parameter types!
First of all, you are doing something wrong in your code. Anyways, a Functor that needs to go into more than a single digit for one of its number codes will use the "$" code separate the two indicators. ThusFunctor1$30
will represent one return type followed
by 30 parameter types.- 作者:
- Jack Meng