chap5: stream basic hofs