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] | #{term() := A} | fn(term(), A) | either(term(), A) | maybe(A)

maybe()

maybe(A) = {ok, A} | error

Function Index

fmap/2

Function Details

fmap/2

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


Generated by EDoc