Bracket Matching by tanakh

main@m=getLine>>=putStrLn.([]!)>>m
[]![]="yes";_![]=s++"EOL"
x!(y:z)|elem y"([{<"=(y:x)!z
(x:y)!(z:w)|x>z||[x..]!!2<z=s++z:w|1>0=y!w
s="failed at: "

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page