[Haskell-beginners] program not running lazily

Doug McIlroy doug at cs.dartmouth.edu
Thu Jan 21 13:43:37 UTC 2016


Each time you find another good 9-mer, you add it to
the head of the list. This means that the ultimate
list will be in reverse order of discovery: the first element
to be printed is the last one to be found.  To get
output in the order it was discovered, build the
output by ys++[y] rather than y:ys.


More information about the Beginners mailing list