Module do_functor

The Functor Type Class.

This module defines the do_functor behaviour.
Required callback functions: fmap/2.

Description

The Functor Type Class.

Data Types

either()

either(A, B) = {error, A} | {ok, B}

fn()

fn(A, B) = fun((A) -> B)

functor()

functor(A) = [A] | map(A) | fn(term(), A) | either(term(), A) | maybe(A)

map()

map(A) = #{term() := A}

maybe()

maybe(A) = {just, A} | nothing

Function Index

fmap/2

Function Details

fmap/2

fmap(F::fn(A, B), Functor::functor(A)) -> functor(B)


Generated by EDoc