[Int] -> Pattern Bool
necklace perCycle xs = _slow ((toRational $ sum xs) / perCycle) $ listToPat $ list xs
  where list :: [Int] -> [Bool]
        list [] = []
        list (x:xs') = (True:(replicate (x-1) False)) ++ list xs'

necklace :: Rational -> [Int] -> Pattern Bool
necklace perCycle xs = _slow ((toRational $ sum xs) / perCycle) $ listToPat $ list xs
  where list :: [Int] -> [Bool]
        list [] = []
        list (x:xs') = (True:(replicate (x-1) False)) ++ list xs'
necklace perCycle xs = _slow ((toRational $ sum xs) / perCycle) $ listToPat $ list xs
  where list :: [Int] -> [Bool]
        list [] = []
        list (x:xs') = (True:(replicate (x-1) False)) ++ list xs'