on [Easy] Bracket Simplification · c/challenges · 2 pts · 3yI know I'm too late – but nonetheless … Factor: [ [ dup "()" "[]" "{}" [ "" splitting:replace ] tri@ tuck = not ] loop print flush ] each-line Edit: Thanks to the Alexes from the Factor Discord for xer suggestion!
on [Easy] String Compression · c/challenges · 2 pts · 3yFactor: (command-line) last [ ] group-by [ length 48 + swap ] assoc-map "" concat-as print
I know I'm too late – but nonetheless …
Factor:
[ [ dup "()" "[]" "{}" [ "" splitting:replace ] tri@ tuck = not ] loop print flush ] each-line
Edit: Thanks to the Alexes from the Factor Discord for xer suggestion!
Factor:
(command-line) last [ ] group-by [ length 48 + swap ] assoc-map "" concat-as print