Sha256: 1e23487920b99ea3fea9f9acaf7fdb59ce9d983ee9fd49511f5a14ba7fd14703

Contents?: true

Size: 318 Bytes

Versions: 124

Compression:

Stored size: 318 Bytes

Contents

-module(example).

-export([leap_year/1, test_version/0]).

-spec leap_year(non_neg_integer()) -> boolean().
leap_year(Year) ->
  divisible_by(Year, 400)
  orelse (divisible_by(Year, 4) andalso
          not divisible_by(Year, 100)).

test_version() ->
    3.



divisible_by(Year, Number) ->
  Year rem Number =:= 0.

Version data entries

124 entries across 124 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.179 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.178 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.177 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.176 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.175 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.174 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.173 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.172 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.171 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.170 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.169 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.167 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.166 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.165 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.164 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.163 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.162 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.161 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.160 tracks/erlang/exercises/leap/src/example.erl