Scala Flow Confusion
1 answer
The reason you get Intinstead Listis because it sis a stream of integers, so it contains integers, not lists.
The reason you get 3 is because the tail (1,2,3,4,5, ...) (i.e. s) is (2,3,4,5, ...) and if you put +1 over it, you will get (3,4,5,6,7, ...) and the head is 3.
, , , , . , s.tail.map(_+1) ( ).
+5