Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(test).
- -compile(export_all).
- do_until(TestFun, DoFun, Acc) ->
- case TestFun(Acc) of
- true ->
- DoFun(),
- do_until(TestFun, DoFun, Acc - 1);
- false -> ok
- end.
- go() ->
- IfTest = fun(N) ->
- N > 0
- end,
- DoIt = fun() ->
- io:format("fuck",[])
- end,
- do_until(IfTest, DoIt, 10).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement