stream: a tail-recursive version of [of_list]