Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
28
Task/Anagrams/Bracmat/anagrams.bracmat
Normal file
28
Task/Anagrams/Bracmat/anagrams.bracmat
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
( get$("unixdict.txt",STR):?list
|
||||
& 1:?product
|
||||
& whl
|
||||
' ( @(!list:(%?word:?w) \n ?list)
|
||||
& :?sum
|
||||
& whl
|
||||
' ( @(!w:%?let ?w)
|
||||
& (!let:~#|str$(N !let))+!sum:?sum
|
||||
)
|
||||
& !sum^!word*!product:?product
|
||||
)
|
||||
& lst$(product,"product.txt",NEW)
|
||||
& 0:?max
|
||||
& :?group
|
||||
& ( !product
|
||||
: ?
|
||||
* ?^(%+%:?exp)
|
||||
* ( ?
|
||||
& !exp
|
||||
: ?
|
||||
+ ( [>!max:[?max&!exp:?group
|
||||
| [~<!max&!group !exp:?group
|
||||
)
|
||||
& ~
|
||||
)
|
||||
| out$!group
|
||||
)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue