Sha256: a2b9f5ab1d8f9a10423af2a11812411d64823a1b534ae81779891134e32db144
Contents?: true
Size: 324 Bytes
Versions: 80
Compression:
Stored size: 324 Bytes
Contents
-module(example). -export([steps/1, test_version/0]). steps(N) when N =< 0 -> {error, "Only strictly positive numbers are allowed"}; steps(N) -> steps(N, 0). test_version() -> 1. steps(1, Acc) -> Acc; steps(N, Acc) when N rem 2 =:= 0 -> steps(N div 2, Acc + 1); steps(N, Acc) -> steps(3 * N + 1, Acc + 1).
Version data entries
80 entries across 80 versions & 1 rubygems