sweet logical scala example