Use notFacing in direction-specific notFacing functions

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2020-11-16 16:53:42 +01:00
parent 0274816aba
commit 5f4ffae179
No known key found for this signature in database
GPG key ID: DE0CF444096A468D

View file

@ -24,25 +24,25 @@ notFacing :: Direction -> Karel -> Bool
notFacing dir = not . facing dir notFacing dir = not . facing dir
notFacingNorth :: Karel -> Bool notFacingNorth :: Karel -> Bool
notFacingNorth = not . facingNorth notFacingNorth = notFacing North
facingSouth :: Karel -> Bool facingSouth :: Karel -> Bool
facingSouth = facing South facingSouth = facing South
notFacingSouth :: Karel -> Bool notFacingSouth :: Karel -> Bool
notFacingSouth = not . facingSouth notFacingSouth = notFacing South
facingEast :: Karel -> Bool facingEast :: Karel -> Bool
facingEast = facing East facingEast = facing East
notFacingEast :: Karel -> Bool notFacingEast :: Karel -> Bool
notFacingEast = not . facingEast notFacingEast = notFacing East
facingWest :: Karel -> Bool facingWest :: Karel -> Bool
facingWest = facing West facingWest = facing West
notFacingWest :: Karel -> Bool notFacingWest :: Karel -> Bool
notFacingWest = not . facingWest notFacingWest = notFacing West
noBeepersInBag :: Karel -> Bool noBeepersInBag :: Karel -> Bool
noBeepersInBag = not . beepersInBag noBeepersInBag = not . beepersInBag