Balanced brackets: Difference between revisions

Content deleted Content added
Tikkanz (talk | contribs)
Line 68: Line 68:
'''Comments''': This task highlights the versatility and usefulness of J's scanning modifiers, <code>/</code> and <code>\</code>.
'''Comments''': This task highlights the versatility and usefulness of J's scanning modifiers, <code>/</code> and <code>\</code>.


The <code>checkBalanced</code> verb would need modification if the task was extended to include uneven numbers of opening and closing brackets.
The <code>checkBalanced</code> verb would need modification (<code> checkBalanced =: ((0 = {:) *. _1 -.@e. ])@bracketDepth </code>) if the task was extended to include uneven numbers of opening and closing brackets.


=={{header|Perl 6}}==
=={{header|Perl 6}}==