Sha256: e6fa0d812789d2671a45eb4c5aa4bb9235e1b4db6cfa8f2ad4c3a3b9958342d1
Contents?: true
Size: 360 Bytes
Versions: 293
Compression:
Stored size: 360 Bytes
Contents
package Example; use strict; use warnings; use Carp; sub compute { my ($strand_a, $strand_b) = @_; croak "DNA strands must be of equal length" unless length $strand_a == length $strand_b; my $distance = $strand_a ^ $strand_b; $distance =~ s/\0//g; return (length $distance) - abs(length($strand_a) - length($strand_b)); } 1;
Version data entries
293 entries across 293 versions & 1 rubygems