Scala implementation of fair backtracking stream