stream headOption using foldRight