Skip to content

Commit 70aa183

Browse files
committed
rename function to arePaired
1 parent 31e2854 commit 70aa183

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

exercises/bracket-push/examples/success-standard/src/Brackets.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Brackets (isPaired) where
1+
module Brackets (arePaired) where
22

33
data BracketType = Opening | Closing
44
data Stack a = Empty | Elem a (Stack a)
@@ -10,8 +10,8 @@ pop :: Stack Char -> Stack Char
1010
pop Empty = Empty
1111
pop (Elem _ stack) = stack
1212

13-
isPaired :: String -> Bool
14-
isPaired xs = checkBalance xs Empty
13+
arePaired :: String -> Bool
14+
arePaired xs = checkBalance xs Empty
1515

1616
checkBalance :: String -> Stack Char -> Bool
1717
checkBalance [] Empty = True
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Brackets (isPaired) where
1+
module Brackets (arePaired) where
22

3-
isPaired :: String -> Bool
4-
isPaired xs = error "You need to implement this function."
3+
arePaired :: String -> Bool
4+
arePaired xs = error "You need to implement this function."

exercises/bracket-push/test/Tests.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Data.Foldable (for_)
44
import Test.Hspec (Spec, describe, it, shouldBe)
55
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
66

7-
import Brackets (isPaired)
7+
import Brackets (arePaired)
88

99
main :: IO ()
1010
main = hspecWith defaultConfig {configFastFail = True} specs
@@ -13,7 +13,7 @@ specs :: Spec
1313
specs = describe "bracket-push" $
1414
describe "isPaired" $ for_ cases test
1515
where
16-
test Case{..} = it description $ isPaired input `shouldBe` expected
16+
test Case{..} = it description $ arePaired input `shouldBe` expected
1717

1818
-- Adapted from
1919
-- Source: exercism/x-common/exercises/bracket-push/canonical-data.json

0 commit comments

Comments
 (0)