A short daily dose of scala examples and occasionally explanations.
// standard ifif(1 > 2) -1 else 0// since blocks return a value you can use a block within the if statement // (not sure when you would want to but...)if ({ val x = 1 val y = 2 x == y }) 1 else 2
You forgot to remove REPL's | chars.
I need to add credits to all the helpers I have on this blog :)
You forgot to remove REPL's | chars.
ReplyDeleteI need to add credits to all the helpers I have on this blog :)
ReplyDelete