part2 state0 = if (takeR (Q.length targetSeq) recipes) == targetSeq
then (Q.length recipes) - (Q.length targetSeq)
else (Q.length recipes) - (Q.length targetSeq) - 1
--- recipes -- (Q.length recipes) - (Q.length targetSeq)
-
where (State _ _ recipes) = head $ dropWhile (unfinished2 targetSeq) $ states state0
unfinished2 :: Recipes -> State -> Bool