Sha256: f1c762dcadb01f11edc2dc5ec7f3bbc5937f4cf6e79b0142b82406a0d8a78ff0

Contents?: true

Size: 205 Bytes

Versions: 311

Compression:

Stored size: 205 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

311 entries across 311 versions & 1 rubygems

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