use λ-case

Slightly cleaner code