thinking in scala