RosettaCodeData/Task/Anagrams/Quackery/anagrams.quackery
2023-07-01 13:44:08 -04:00

22 lines
490 B
Text

$ "rosetta/unixdict.txt" sharefile drop nest$
[] swap witheach
[ dup sort
nested swap nested join
nested join ]
sortwith [ 0 peek swap 0 peek $< ]
dup
[ dup [] ' [ [ ] ] rot
witheach
[ tuck 0 peek swap 0 peek = if
[ tuck nested join swap ] ]
drop
dup [] != while
nip again ]
drop
witheach
[ over witheach
[ 2dup 0 peek swap 0 peek = iff
[ 1 peek echo$ sp ]
else drop ]
drop cr ]
drop