makeShingle :: [[a]]->[[a]]
makeShingle [] = []
makeShingle zs
| length zs >= 4 = (foldl(\acc z -> (acc ++ z)) [] (take 4 zs)) : (makeShingle $ drop 1 zs)
| otherwise = []
makeShingle $ filter(/="") $ genericRev $ otherTok "this, is a string. it is a string, like many other. but i like it, i like it a lot!" standard_delim
["thisisastring","isastringit","astringitis","stringitisa","itisastring","isastringlike","astringlikemany","stringlikemanyother","likemanyotherbut","manyotherbuti","otherbutilike","butilikeit","ilikeiti","likeitilike","itilikeit","ilikeita","likeitalot"]
No comments:
Post a Comment