subsvars :: Env -> [Int]
subsvars = f 0
 where
  f n [] = []
  f n (Lift _ : xs) = f n xs
  f n (Sub _ : xs) = n : f (n + 1) xs
  f n (Skip : xs) = f (n + 1) xs
subsvars :: Env -> [Int]
subsvars = f 0
 where
  f n [] = []
  f n (Lift _ : xs) = f n xs
  f n (Sub _ : xs) = n : f (n + 1) xs
  f n (Skip : xs) = f (n + 1) xs
subsvars = f 0
 where
  f n [] = []
  f n (Lift _ : xs) = f n xs
  f n (Sub _ : xs) = n : f (n + 1) xs
  f n (Skip : xs) = f (n + 1) xs