Applicative
Applicative
Bases: Functor[F, A]
, Protocol
An applicative is a functor that contains a function which the applicative applies to arguments.
The generic type variable F is the applicative type. The generic type variable A is the type of the value contained in the applicative type.
Source code in funclift/applicative.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
ap(a)
summary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
self |
Applicative[F, Callable[[C], E]]
|
description |
required |
a |
Applicative[F, C]
|
description |
required |
Returns:
Type | Description |
---|---|
Applicative[F, E]
|
Applicative[F, E]: description |
Source code in funclift/applicative.py
37 38 39 40 41 42 43 44 45 46 47 48 |
|
pure(a)
staticmethod
summary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a |
B
|
description |
required |
Returns:
Type | Description |
---|---|
Applicative[F, B]
|
Applicative[F, B]: description |
Source code in funclift/applicative.py
25 26 27 28 29 30 31 32 33 34 35 |
|