object
FunctorUsage extends App
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
args: Array[String]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
val
delTask: Task[Int]
-
-
-
val
executionStart: Long
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
val
len: (String) ⇒ Int
-
-
val
listOpt: Functor[[α]List[Option[α]]]
-
def
main(args: Array[String]): Unit
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
-
val
voidTask2: Task[Unit]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Deprecated Value Members
-
def
delayedInit(body: ⇒ Unit): Unit
A Functor is a ubiquitous typeclass involving type constructors of kind * → *, which is another way of saying types that have a single type variable. Examples might be Option, List, Future.
The Functor category involves a single operation, named
map
:def map[A, B](fa: F[A])(f: A => B): F[B]
This method takes a Function from A => B and turns an F[A] into an F[B]