Sha256: 03ebfe5a3d881a0c930ab74a8298bc0b93c3c9b2919d57de596b3691efba8676

Contents?: true

Size: 206 Bytes

Versions: 7

Compression:

Stored size: 206 Bytes

Contents

function distance(s1::AbstractString, s2::AbstractString)
    length(s1) != length(s2) && throw(ArgumentError("Sequences must have the same length"))

    reduce(+, 0, a != b for (a, b) in zip(s1, s2))
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trackler-2.0.6.29 tracks/julia/exercises/hamming/example.jl
trackler-2.0.6.28 tracks/julia/exercises/hamming/example.jl
trackler-2.0.6.27 tracks/julia/exercises/hamming/example.jl
trackler-2.0.6.26 tracks/julia/exercises/hamming/example.jl
trackler-2.0.6.25 tracks/julia/exercises/hamming/example.jl
trackler-2.0.6.24 tracks/julia/exercises/hamming/example.jl
trackler-2.0.6.23 tracks/julia/exercises/hamming/example.jl