Balanced brackets: Difference between revisions
m
→{{header|J}}: eliminate unneeded punctuation
Simple9371 (talk | contribs) |
m (→{{header|J}}: eliminate unneeded punctuation) |
||
Line 2,342:
checkBalanced =: _1 -.@e. bracketDepth
genBracketPairs =: (?~@# { ])@#"0 1&'[]' NB. bracket pairs in arbitrary order</lang>
'''Examples''':<lang j> (,
OK
][ bad
|