stackExample :: IO ()
stackExample = do
  runWithStyle [] $ loop 0
  liftIO $ putChar '\n'
  where
    loop 8 = pure ()
    loop n = do
      setStyle [Save, BgColor $ Color256 n]
      liftIO $ putStr $ replicate (fromIntegral n) ' '
      loop (n + 1)
      liftIO $ putStr $ replicate (fromIntegral n) ' '
      setStyle [Restore]
stackExample :: IO ()
stackExample = do
  runWithStyle [] $ loop 0
  liftIO $ putChar '\n'
  where
    loop 8 = pure ()
    loop n = do
      setStyle [Save, BgColor $ Color256 n]
      liftIO $ putStr $ replicate (fromIntegral n) ' '
      loop (n + 1)
      liftIO $ putStr $ replicate (fromIntegral n) ' '
      setStyle [Restore]
stackExample = do
  runWithStyle [] $ loop 0
  liftIO $ putChar '\n'
  where
    loop 8 = pure ()
    loop n = do
      setStyle [Save, BgColor $ Color256 n]
      liftIO $ putStr $ replicate (fromIntegral n) ' '
      loop (n + 1)
      liftIO $ putStr $ replicate (fromIntegral n) ' '
      setStyle [Restore]