hi all,
I’m a newcomer, when I read found " for / yield " may have problem, for example:
following code:
scala> val u = for ( s<- “hello” ) yield s.toUpper;
the result is :
u: String = HELLO
the result is right. but when I add if guard:
scala> val u = for ( s<- “hello” if s != ‘e’ ) yield s.toUpper;
the result is:
u: String = hllo