RosettaCodeData/Task/Ordered-words/Bracmat/ordered-words.bracmat

26 lines
708 B
Text
Raw Permalink Normal View History

2013-04-10 16:19:29 -07:00
( orderedWords
= bow result longestLength word character
. 0:?bow
& :?result
& 0:?longestLength
& @( get$(!arg,STR)
: ?
( [!bow %?word \n [?bow ?
& @( !word
: ( ? %@?character <%@!character ?
| ?
( [!longestLength
& !word !result:?result
| [>!longestLength:[?longestLength
& !word:?result
|
)
)
)
& ~`
)
)
| !result
)
& orderedWords$"unixdict.txt"