-- | /O(n)/. A strict version of 'foldr'. Each application of the operator is
-- evaluated before using the result in the next application. This
-- function is strict in the starting value.
foldr' :: (a -> b -> b) -> b -> Set a -> b
foldr' f z = go z
  where
    STRICT_1_OF_2(go)
    go z' Tip           = z'
    go z' (Bin _ x l r) = go (f x (go z' r)) l

foldr' :: (a -> b -> b) -> b -> Set a -> b
foldr' f z = go z
  where
    STRICT_1_OF_2(go)
    go z' Tip           = z'
    go z' (Bin _ x l r) = go (f x (go z' r)) l

foldr' f z = go z
  where
    STRICT_1_OF_2(go)
    go z' Tip           = z'
    go z' (Bin _ x l r) = go (f x (go z' r)) l
