Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switchFirstEgg eggCarton
- | eggCarton 1 == 0 = switchedCarton where switchedCarton position = if position == 1 then 2 else eggCarton position
- | eggCarton 1 == 1 = switchedCarton where switchedCarton position = if position == 1 then 0 else eggCarton position
- | eggCarton 1 == 2 = switchedCarton where switchedCarton position = if position == 1 then 1 else eggCarton position
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement