seenByG :: Omega Int -> Closed a -> HashSet a
seenByG n (Closed m _ closef)
  | n - A m < 0 = setOf closef
  | otherwise   = seenByI (n - A m) closef
  where
    seenByI 0 closef = setOf closef
    seenByI n (Unchanging set) = set
    seenByI n (ClosedF _ next)  = seenByI (opred n) next

-- | @seenBy n@ converts a 'Closed' set into its underlying set,
-- approximated by at least @n@ iterations.
seenByG :: Omega Int -> Closed a -> HashSet a
seenByG n (Closed m _ closef)
  | n - A m < 0 = setOf closef
  | otherwise   = seenByI (n - A m) closef
  where
    seenByI 0 closef = setOf closef
    seenByI n (Unchanging set) = set
    seenByI n (ClosedF _ next)  = seenByI (opred n) next

-- | @seenBy n@ converts a 'Closed' set into its underlying set,
-- approximated by at least @n@ iterations.
seenByG n (Closed m _ closef)
  | n - A m < 0 = setOf closef
  | otherwise   = seenByI (n - A m) closef
  where
    seenByI 0 closef = setOf closef
    seenByI n (Unchanging set) = set
    seenByI n (ClosedF _ next)  = seenByI (opred n) next

-- | @seenBy n@ converts a 'Closed' set into its underlying set,
-- approximated by at least @n@ iterations.