> An interface that declares that a certain container type is capable of
> running the map function. This is Iterable in scala...
Bzzt wrong, perhaps you don't know as much about Scala as you think.
And even if it was Iterable, this has nada to do with higher kinds -
you know, abstracting on *type constructors* as James has already
mentioned - perhaps you don't know as much about type system as you
think.
This is what a "mappable" declaration looks like in Scala using higher
kinds:
trait Functor[F[_]] {
def fmap[A, B](fa: F[A], f: A => B): F[B]
}
Note its complete lack of resemblance to Iterable.
And in Haskell:
class Functor f where
fmap :: f a -> (a -> b) -> f a
And in Java:
Oh wait, you can't; you're screwed - the type system is completely
inept.
You're out of depth again Zwitserloot. You're stuck in Java Nanny land.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---