Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. switchFirstEgg eggCarton
  2.     | eggCarton 1 == 0  = switchedCarton where switchedCarton position = if position == 1 then 2 else eggCarton position
  3.     | eggCarton 1 == 1  = switchedCarton where switchedCarton position = if position == 1 then 0 else eggCarton position
  4.     | 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