Advertisement
ZaBlanc

Morning Kata 3/5 - Erlang counting!

Mar 5th, 2012
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Erlang 0.19 KB | None | 0 0
  1. -module(funcs).
  2. -export([count2/1]).
  3.  
  4. countdown2(To, To) -> io:format("Done!\n", []);
  5. countdown2(At, To) -> io:format("~p\n", [At]), countdown2(At + 1, To).
  6.  
  7. count2(N) -> countdown2(0, N).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement