From 5f4ffae179818bd5bde697525ce09c0b227afad1 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 16 Nov 2020 16:53:42 +0100 Subject: [PATCH] Use `notFacing` in direction-specific `notFacing` functions Signed-off-by: Matej Focko --- SuperKarel.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SuperKarel.hs b/SuperKarel.hs index b83f4ab..f431500 100644 --- a/SuperKarel.hs +++ b/SuperKarel.hs @@ -24,25 +24,25 @@ notFacing :: Direction -> Karel -> Bool notFacing dir = not . facing dir notFacingNorth :: Karel -> Bool -notFacingNorth = not . facingNorth +notFacingNorth = notFacing North facingSouth :: Karel -> Bool facingSouth = facing South notFacingSouth :: Karel -> Bool -notFacingSouth = not . facingSouth +notFacingSouth = notFacing South facingEast :: Karel -> Bool facingEast = facing East notFacingEast :: Karel -> Bool -notFacingEast = not . facingEast +notFacingEast = notFacing East facingWest :: Karel -> Bool facingWest = facing West notFacingWest :: Karel -> Bool -notFacingWest = not . facingWest +notFacingWest = notFacing West noBeepersInBag :: Karel -> Bool noBeepersInBag = not . beepersInBag