• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scala function chaining

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying a simple function chaining in Scala, but do not understand the strange output! I pass newChars as a List to a function. The value of the List are just a, b, c, d



prints



I was expecting the third println to actually print b and c. But surprisingly it prints a and b. I'm sure that I'm doing something wrong.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh silly me. Just figured that out!



did what I wanted!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic