Skip to content

Commit

Permalink
Rename bracket push (#295)
Browse files Browse the repository at this point in the history
* Rename bracket push

* rename test inst var

* Generated exercise Meta files
  • Loading branch information
macta authored Apr 24, 2019
1 parent 7cf2815 commit ebf81db
Show file tree
Hide file tree
Showing 9 changed files with 412 additions and 412 deletions.
26 changes: 13 additions & 13 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,6 @@
"algorithms"
]
},
{
"slug" : "bracket-push",
"uuid" : "d126be16-9d41-0d00-8fdc-2ff208866539",
"core" : false,
"auto_approve" : false,
"unlocked_by" : "leap",
"difficulty" : 4,
"topics" : [
"strings",
"parsing",
"stacks"
]
},
{
"slug" : "clock",
"uuid" : "f8080717-9d41-0d00-9011-755a08866539",
Expand Down Expand Up @@ -313,6 +300,19 @@
"algorithms"
]
},
{
"slug" : "matching-brackets",
"uuid" : "d126be16-9d41-0d00-8fdc-2ff208866539",
"core" : false,
"auto_approve" : false,
"unlocked_by" : "leap",
"difficulty" : 4,
"topics" : [
"strings",
"parsing",
"stacks"
]
},
{
"slug" : "pangram",
"uuid" : "6be398be-4a3f-0d00-bb67-0d71071d6982",
Expand Down
193 changes: 0 additions & 193 deletions dev/src/Exercism/BracketPushTest.class.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
A simple solution to bracket exercise using a Stack
"
Class {
#name : #BracketPush,
#name : #MatchingBrackets,
#superclass : #Object,
#category : #'Exercism-BracketPush'
#category : #'Exercism-MatchingBrackets'
}

{ #category : #'private-constants' }
BracketPush >> delimiterPairs [
MatchingBrackets >> delimiterPairs [
^ #('()' '[]' '{}')
]
{ #category : #'private-testing' }
BracketPush >> is: closeChar closingBracketFor: openChar [
MatchingBrackets >> is: closeChar closingBracketFor: openChar [
^ self delimiterPairs
detect: [ :each | each first = openChar & (each last = closeChar) ]
ifFound: [ true ]
ifNone: [ false ]
]
{ #category : #exercism }
BracketPush >> isPaired: aString [
MatchingBrackets >> isPaired: aString [
| stack |
stack := Stack new.
Expand Down
Loading

0 comments on commit ebf81db

Please sign in to comment.