Using head and tail separately in a stream - Effect Community