org.dsa.iot
Helper class providing a simple syntax to add side effects to the returned value:
def square(x: Int) = { x * x } having (r => println "returned: " + r)
or simplified
def square(x: Int) = (x * x) having println
Helper class providing a simple syntax to add side effects to the returned value:
or simplified