Use notFacing
in direction-specific notFacing
functions
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
0274816aba
commit
5f4ffae179
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue