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.159 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.158 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.157 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.156 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.155 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.154 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.153 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.152 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.151 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.150 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.149 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.148 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.147 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.146 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.145 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.144 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.143 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.142 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.141 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.140 tracks/erlang/exercises/leap/src/example.erl