19 Jan
2007
19 Jan
'07
6 a.m.
Hello, is there a way to trace a list comprehension such as concat1 :: [[a]] -> [a] concat1 xss = [ x | xs <- xss, x <- xs ] I would like to see what gets stored in xs. Cheers, phiroc
19 Jan
19 Jan
6:04 a.m.
On Jan 18, 2007, at 17:00 , Philippe de Rochambeau wrote:
concat1 :: [[a]] -> [a] concat1 xss = [ x | xs <- xss, x <- xs ]
I would like to see what gets stored in xs.
Offhand:
import Debug.Trace
concat1 :: Show a => [[a]] -> [a] concat1 xss = [ x | xs <- xss, x <- trace (show xs) xs ]
(The Show qualification is kinda unfortunate.) -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
6878
Age (days ago)
6878
Last active (days ago)
1 comments
2 participants
participants (2)
-
Brandon S. Allbery KF8NH -
Philippe de Rochambeau