intWeights :: [(Weight, a)] -> [(Int, a)]
intWeights was =
  let (ws, as) = unzip was
      wLCM = foldl' lcm 1 . map denominator $ ws
  in zip ((\w -> numerator w * (wLCM `div` denominator w)) <$> ws) as
intWeights :: [(Weight, a)] -> [(Int, a)]
intWeights was =
  let (ws, as) = unzip was
      wLCM = foldl' lcm 1 . map denominator $ ws
  in zip ((\w -> numerator w * (wLCM `div` denominator w)) <$> ws) as
intWeights was =
  let (ws, as) = unzip was
      wLCM = foldl' lcm 1 . map denominator $ ws
  in zip ((\w -> numerator w * (wLCM `div` denominator w)) <$> ws) as