Hello,

For a challenge of Exercism I need to check if some parenthes and brackets are balanced.

so for example

()  = true
([])  = true

but (])  is not true because the bracket has no opening bracket.

Now I wonder if I can premature end a #do:  like this

collection do: [:element | (condition with element) ifFalse: [^false]]

in pseudo code

is this a valid way to end the do ?
or is there a better way ?

Roelof

Reply via email to