Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. switchFirstEgg eggCarton = if (eggCarton 1 == 0)
  2.                 then (switchedCarton where switchedCarton position = (if (position == 1) then 2 else eggCarton position))
  3.                 else if (eggCarton 1 == 1)
  4.                     then (switchedCarton where switchedCarton position = (if (position == 1) then 0 else eggCarton position))
  5.                     else if (eggCarton 1 == 2)
  6.                         then (switchedCarton where switchedCarton position = (if (position == 1) then 1 else eggCarton position))
  7.                         else (switchedCarton where switchedCarton position = eggCarton position)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement