You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
245 B

-module(fizzbuzz).
-export([run/0]).
-import(lists, [map/2, seq/2]).
check(N) when N rem 15 == 0 -> "fizzbuzz";
check(N) when N rem 5 == 0 -> "buzz";
check(N) when N rem 3 == 0 -> "fizz";
check(N) -> N.
run() -> map(fun check/1, seq(1, 100)).