-module(arityt).
-export([foreach_/1]).
-export([foreach_/2]).

foreach_({[H|T],Fun})->
   Fun(H),
   foreach_({T, Fun});
foreach_({[],_}) -> 
   ok.


foreach_([H|T],Fun)->
   Fun(H),
   foreach_(T, Fun);
foreach_([],_) -> finished.
