streams and functor examples