home
/
code
/
hope.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
f0dcb5c708feccf69e8e42ae2a061b1630754623
[hope.git]
/
src
/
hope_monad.erl
1
-module(hope_monad).
2
3
-type t(_A) ::
4
term().
5
6
-callback return(A) ->
7
t(A).
8
9
-callback map(t(A), fun((A) -> (B))) ->
10
t(B).
11
12
%% @doc "pipe" is equivalent to traditional "bind", in general use-case, but is
13
%% arguably more useful for composition in Erlang's syntactic setting.
14
%% @end
15
-callback pipe([fun((A) -> t(B))], A) ->
16
t(B).
This page took
0.046507 seconds
and
3
git commands to generate.