Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Balanced-brackets/Quackery/balanced-brackets.quackery
Normal file
21
Task/Balanced-brackets/Quackery/balanced-brackets.quackery
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[ char [ over of
|
||||
swap
|
||||
char ] swap of
|
||||
join shuffle ] is bracket$ ( n --> $ )
|
||||
|
||||
[ 0 swap witheach
|
||||
[ char [ =
|
||||
iff 1 else -1 +
|
||||
dup 0 < if
|
||||
conclude ]
|
||||
0 = ] is balanced ( $ --> b )
|
||||
|
||||
|
||||
10 times
|
||||
[ 20 i 2 * - times sp
|
||||
i bracket$ dup echo$
|
||||
say " is "
|
||||
balanced not if
|
||||
[ say "un" ]
|
||||
say "balanced."
|
||||
cr ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue