%%---------------------------------------------------------------------------
%% |
%% Module      :  Curry
  Copyright    :   ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License     :  BSD-style (see the LICENSE file)
%%
  Maintainer   :     , 
                   , 
%% Stability   :  experimental
%% Portability :  portable
%%
  The  module .
%%
%%---------------------------------------------------------------------------
-module('Curry').

-include("../Foreign.hrl").

-compile({no_auto_import, [apply/2]}).

-export([ curry/1
        , curryIO/1
        , apply/2
        , applyIO/2
        ]).

-include("./Curry.hrl").

curryIO(Fun) -> ?IO(curry(Fun)).

applyIO(Fun, Args) ->
  apply(?RunIO(Fun), Args).

%% Apply a curried function
apply(Fun, [A|Args]) -> apply(Fun(A), Args);
apply(Ret, []) -> Ret.

---------------------------------------------------------------------------
 |
 Module      :  Curry
 License     :  BSD-style (see the LICENSE file)

 Stability   :  experimental
 Portability :  portable


---------------------------------------------------------------------------
 Apply a curried function
  Copyright    :   ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
  Maintainer   :     , 
                   , 
  The  module .
-module('Curry').

-include("../Foreign.hrl").

-compile({no_auto_import, [apply/2]}).

-export([ curry/1
        , curryIO/1
        , apply/2
        , applyIO/2
        ]).

-include("./Curry.hrl").

curryIO(Fun) -> ?IO(curry(Fun)).

applyIO(Fun, Args) ->
  apply(?RunIO(Fun), Args).

apply(Fun, [A|Args]) -> apply(Fun(A), Args);
apply(Ret, []) -> Ret.
