[Haskell-cafe] how to print out intermediate results in a recursive function?
ozgurakgun at gmail.com
Sat Feb 4 06:00:51 CET 2012
There is also this nice trick to use Debug.Trace:
merge xs ys | trace (show (xs,ys)) False = undefined -- add this as the
first case to merge
mergesort xs | trace (show xs) False = undefined -- and this as the first
case to mergesort
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe