From c25f3d2541e548521e38d6017cd6e8ca9a4bda25 Mon Sep 17 00:00:00 2001 From: Luciano Palma Date: Sun, 2 Apr 2017 13:47:10 +0100 Subject: [PATCH] rename function to arePaired --- .../bracket-push/examples/success-standard/src/Brackets.hs | 6 +++--- exercises/bracket-push/src/Brackets.hs | 6 +++--- exercises/bracket-push/test/Tests.hs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/exercises/bracket-push/examples/success-standard/src/Brackets.hs b/exercises/bracket-push/examples/success-standard/src/Brackets.hs index 8c3c1634f..c95602b50 100644 --- a/exercises/bracket-push/examples/success-standard/src/Brackets.hs +++ b/exercises/bracket-push/examples/success-standard/src/Brackets.hs @@ -1,4 +1,4 @@ -module Brackets (isPaired) where +module Brackets (arePaired) where data BracketType = Opening | Closing data Stack a = Empty | Elem a (Stack a) @@ -10,8 +10,8 @@ pop :: Stack Char -> Stack Char pop Empty = Empty pop (Elem _ stack) = stack -isPaired :: String -> Bool -isPaired xs = checkBalance xs Empty +arePaired :: String -> Bool +arePaired xs = checkBalance xs Empty checkBalance :: String -> Stack Char -> Bool checkBalance [] Empty = True diff --git a/exercises/bracket-push/src/Brackets.hs b/exercises/bracket-push/src/Brackets.hs index 961a12ee8..df83bb29b 100644 --- a/exercises/bracket-push/src/Brackets.hs +++ b/exercises/bracket-push/src/Brackets.hs @@ -1,4 +1,4 @@ -module Brackets (isPaired) where +module Brackets (arePaired) where -isPaired :: String -> Bool -isPaired xs = error "You need to implement this function." +arePaired :: String -> Bool +arePaired xs = error "You need to implement this function." diff --git a/exercises/bracket-push/test/Tests.hs b/exercises/bracket-push/test/Tests.hs index 1d4c32cd8..9d45e054c 100644 --- a/exercises/bracket-push/test/Tests.hs +++ b/exercises/bracket-push/test/Tests.hs @@ -4,7 +4,7 @@ import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) -import Brackets (isPaired) +import Brackets (arePaired) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs @@ -13,7 +13,7 @@ specs :: Spec specs = describe "bracket-push" $ describe "isPaired" $ for_ cases test where - test Case{..} = it description $ isPaired input `shouldBe` expected + test Case{..} = it description $ arePaired input `shouldBe` expected -- Adapted from -- Source: exercism/x-common/exercises/bracket-push/canonical-data.json