unfoldRight

def unfoldRight[A, B](f: B => Option[(A, B)], x: B): List[A] = {
  f(x) match {
    case Some((a, b)) => a :: unfoldRight(f, b)
    case None         => Nil
  }
}

See also: unfoldr in Haskell