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

14 lines
439 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: arrays assocs io.encodings.utf8 io.files kernel
math.factorials math.statistics prettyprint rosalind.common
sequences ;
IN: rosalind.pmch
: pmch ( str -- counts )
histogram "AC" >array swap substitute [ n! ] map product ;
: pmch-main ( -- ) "datasets/rosalind/pmch.txt" utf8 file-contents
fasta>assoc values first pmch . ;
MAIN: pmch-main