1
0
Fork 0
factor-puzzles/rosalind/hamm/hamm.factor

13 lines
368 B
Factor
Raw Normal View History

2020-11-29 08:22:10 +01:00
! Copyright (C) 2020 Bubbler.
! See http://factorcode.org/license.txt for BSD license.
USING: io.encodings.utf8 io.files kernel prettyprint sequences
sequences.extras splitting ;
IN: rosalind.hamm
: hamm ( string1 string2 -- count )
[ = not ] 2count ;
: hamm-main ( -- ) "datasets/rosalind/hamm.txt" utf8 file-contents
"\n" split first2 hamm . ;
MAIN: hamm-main