Useful Scala code just dependent on standard libraries