Implement multi-way if and lambda-case