Sha256: f49dce9aaefd35fd455cd80ffd234a77795af135fd7b166513388b2d492c7e1e
Contents?: true
Size: 314 Bytes
Versions: 165
Compression:
Stored size: 314 Bytes
Contents
use "collections" use "itertools" primitive HammingDistance fun apply(strand1: String, strand2: String): USize ? => if (strand1.size() != strand2.size()) then error end Iter[U8](strand1.values()) .zip[U8](strand2.values()) .filter({(t: (U8, U8)): Bool => t._1 != t._2 }) .count()
Version data entries
165 entries across 165 versions & 1 rubygems