Browse Source

Export func/2 and flatten_arity/1 from ebb_prim.

Paul Downen 13 years ago
parent
commit
99947ded94
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/ebb_prim.erl

+ 5 - 2
src/ebb_prim.erl

@@ -2,13 +2,14 @@
 -include("../include/ebb_prim.hrl").
 
 %%% Operation construction
--export([func/1, value/1, values/1,
+-export([func/1, func/2,
+	 value/1, values/1,
 	 pipe/1, par/1,
 	 route/3, sync/1,
 	 split/1, merge/1, switch/2]).
 
 %%% Operation querying
--export([in_arity/1, out_arity/1, can_connect/2]).
+-export([in_arity/1, out_arity/1, flatten_arity/1, can_connect/2]).
 
 %%%-----------------------------------------------------------------------------
 %%% Operation construction
@@ -18,6 +19,8 @@ func(F) when is_function(F) ->
     {arity, N} = erlang:fun_info(F, arity),
     #func{in=N, code=F}.
 
+func(F, N) when is_function(F), is_number(N) ->
+    pipe([func(F), split(N)]).
 
 value(X) -> #value{value=X}.