BifunctorUsage

object BifunctorUsage extends App

A Bifunctor is very similar to a Functor, which you are hopefully already familiar with. Whereas a Functor operates on a * → * and has a single operation map which takes a function from A => B to map a F[A] to a F[B], a Bifunctor operates on a , → * and has a single operation bimap which takes two functions: A => C and a B => D to map a F[A,B] to a F[C,D]:

def bimap[A, B, C, D](fab: F[A, B])(f: A => C, g: B => D): F[C, D]

some examples of common types for which we have Bifunctor instances are Either, Validation, /, Tuple2

trait App
trait DelayedInit
class Object
trait Matchable
class Any

Value members

Inherited methods

final protected
def args: Array[String]
Inherited from
App
final
def main(args: Array[String]): Unit
Inherited from
App

Deprecated and Inherited methods

@deprecated(message = "the delayedInit mechanism will disappear", since = "2.11.0")
override
def delayedInit(body: => Unit): Unit
Deprecated
[Since version 2.11.0] the delayedInit mechanism will disappear
Definition Classes
App -> DelayedInit
Inherited from
App

Concrete fields

val bff: Bifunctor[[α, β] =>> List\/ β]]
val bfres: List[String \/ Int]
val fourTwo: (Int, Int)
val rightF: Functor[[_] =>> String \/ _$8]
val strlen: String => Int
val two: Validation[String, Int]