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