RosettaCodeData/Task/Odd-word-problem/Quackery/odd-word-problem.quackery
2023-07-01 13:44:08 -04:00

23 lines
492 B
Text

[ upper dup lower != ] is letter ( c --> b )
forward is backwords ( $ --> $ )
[ [ behead
dup letter while
emit again ]
dup emit
char . !=
if backwords ] is forwords ( $ --> $ )
[ [ behead
dup letter while
swap recurse
rot emit ]
dup emit
char . !=
if forwords ] resolves backwords ( $ --> $ )
[ forwords drop cr ] is oddwords ( $ --> )
$ "we,are;not,in,kansas;any,more." oddwords
$ "what,is,the;meaning,of:life." oddwords