This doesn't list words backwards, but is an oft used approach:
          : counted.word ( k n nt -- k' n' )    2>r dup if 1- 2r> .word
             else 2r> drop then ;
          : counted-wordlist-words ( k wid -- k' )   0 swap cr
             ['] counted.word map-wordlist  drop ;
          30 value ktop#
          : ktop ( k -- )    0 max dup to ktop#
             context @ counted-wordlist-words drop ;
          : top ( -- )   ktop# ktop ;

     The above, rather inefficient code, works on android gforth.
Other istallations may need some tweeks.

     Listing words backwards isn't terribly hard, but requires storing
the links somewhere: recursion, on the stack or return stack usually;
in an array; or as extra link field in the dictionary headers.

Reply via email to