> What does a while loop evaluate to in your favorite language?
depends on what you want! for example this Haskell package¹ defines three versions of while:
-- collect the result of each iteration into a list
whileM :: Monad m => m Bool -> m a -> m [a]
-- combine the result of each iteration together into a final result
whileM' :: (Monad m, MonadPlus f) => m Bool -> m a -> m (f a)
-- drop the results and return `()`
whileM_ :: Monad m => m Bool -> m a -> m ()
by convention, the ones ending in an underscore (`forM_`, `whileM_`, `sequence_` etc) drop their results, i.e. are only used for their side-effects.
¹ http://hackage.haskell.org/package/monad-loops-0.4.3/docs/Co...