Hi,

Matt Benson wrote:

> TBH, I can't recall what the argument was against "Functor" either; I
> think it had something to do with potentially confusing users of other
> libraries?
> 
> Functor
> |_NullaryFunctor
> |_UnaryFunctor
> |_BinaryFunctor
> 
> *is* the current state.  :)  Now, when I woke up this morning I did so
> with another concept floating around in my brain (it may be crazy, or not
> work):
> 
> interface Arity {
> }
> 
> interface Argumented<A extends Arity> {
> }
> 
> interface Unary<A> extends Arity {
> }
> 
> interface UnaryFunction<A, T> extends Argumented<Unary<A>> {
> }
> 
> Bear in mind the goal is to be able to inspect the type of a functor to
> determine its arity (momentarily disregarding the fact that this goal is
> seeming less worth the trouble all the while :P ).  This approach would
> make that a bit more complex, but still seemingly doable.
> 
> Thoughts?

@Arity(0)
interface NullaryFunctor {
}

@Arity(1)
interface UnaryFunctor {
}

@Arity(2)
interface BinaryFunctor {
}

Crazy enough? ;-)

Do those interfaces need an ancestor?

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to