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.119 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.118 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.117 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.116 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.115 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.114 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.113 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.111 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.110 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.109 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.108 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.107 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.106 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.105 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.104 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.103 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.102 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.101 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.100 tracks/erlang/exercises/leap/src/example.erl
trackler-2.2.1.99 tracks/erlang/exercises/leap/src/example.erl