Sha256: 1d156c83068dc808fd96cfe44d21cdc05d64f9a4897732349fb3a78379071223

Contents?: true

Size: 439 Bytes

Versions: 187

Compression:

Stored size: 439 Bytes

Contents

-module(example).

-export([hamming_distance/2, test_version/0]).

hamming_distance(From, To) ->
  Comparisons = lists:zipwith(fun(X,Y) -> case X =:= Y of
                                            true -> 0;
                                            false -> 1
                                          end
                              end,
                              From, To),
  lists:sum(Comparisons).

test_version() ->
    1.

Version data entries

187 entries across 187 versions & 1 rubygems

Version Path
trackler-2.2.1.55 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.54 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.53 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.52 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.51 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.50 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.49 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.48 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.47 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.46 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.45 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.44 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.43 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.42 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.41 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.40 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.39 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.38 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.37 tracks/erlang/exercises/hamming/src/example.erl
trackler-2.2.1.36 tracks/erlang/exercises/hamming/src/example.erl