Skip to content

NestWhileList

Like NestWhile but returns the entire history.

$ wo 'NestWhileList[#/2 &, 8, EvenQ]'
{8, 4, 2, 1}