home
/
code
/
hope.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement function threading.
[hope.git]
/
test
/
hope_fun_SUITE.erl
diff --git
a/test/hope_fun_SUITE.erl
b/test/hope_fun_SUITE.erl
index
7b5051b
..
333c81f
100644
(file)
--- a/
test/hope_fun_SUITE.erl
+++ b/
test/hope_fun_SUITE.erl
@@
-11,7
+11,7
@@
[ t_specs/1
, t_id/1
, t_curry/1
[ t_specs/1
, t_id/1
, t_curry/1
- , t_compose/1
+ , t_compose
_and_thread
/1
]).
]).
@@
-31,7
+31,7
@@
groups() ->
[ t_specs
, t_id
, t_curry
[ t_specs
, t_id
, t_curry
- , t_compose
+ , t_compose
_and_thread
],
Properties = [parallel],
[ {?GROUP, Properties, Tests}
],
Properties = [parallel],
[ {?GROUP, Properties, Tests}
@@
-66,11
+66,12
@@
t_curry(_Cfg) ->
H = H2(b),
{a, b, c} = H(c).
H = H2(b),
{a, b, c} = H(c).
-t_compose(_Cfg) ->
+t_compose
_and_thread
(_Cfg) ->
A2B = fun (a) -> b end,
B2C = fun (b) -> c end,
C2D = fun (c) -> d end,
Fs = [C2D, B2C, A2B],
d = (hope_fun:compose ( Fs ))(a),
d = (hope_fun:compose_right ( Fs ))(a),
A2B = fun (a) -> b end,
B2C = fun (b) -> c end,
C2D = fun (c) -> d end,
Fs = [C2D, B2C, A2B],
d = (hope_fun:compose ( Fs ))(a),
d = (hope_fun:compose_right ( Fs ))(a),
- d = (hope_fun:compose_left (lists:reverse(Fs) ))(a).
+ d = (hope_fun:compose_left (lists:reverse(Fs) ))(a),
+ d = hope_fun:thread (lists:reverse(Fs), a).
This page took
0.035891 seconds
and
4
git commands to generate.