September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
9
Task/Semordnilap/Zkl/semordnilap.zkl
Normal file
9
Task/Semordnilap/Zkl/semordnilap.zkl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var [const] words= // create hashed unixdict of striped words (word:True, ...)
|
||||
File("dict.txt").howza(11).pump(Dictionary().howza(8).add.fp1(True));
|
||||
ss:=words.pump(List, // push stripped unixdict words through some functions
|
||||
fcn(w){ words.holds(w.reverse()) }, Void.Filter, // filter palindromes
|
||||
// create ("word","drow") if "word"<"drow" (ie remove duplicates)
|
||||
fcn(w){ r:=w.reverse(); if(w<r) T(w,r) else Void.Skip });
|
||||
|
||||
ss.len().println(); //--> 158
|
||||
ss.shuffle()[0,5].println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue