Re: [Haskell-cafe] Re: Query on list comprehension
18 Mar
2009
18 Mar
'09
9:57 a.m.
Jon Fairbairn schrieb:
Melanie_Green
writes: What are the limitations of list comprehension. [...] a aa aaa
I'm not clear what you mean by the question. Why do you want to use list comprehensions? What if they aren't the best way of getting the result you want?
You can write
[a | b <- [replicate n 'a' | n <- [1..]], a <- b ++ "\n"]
but does that "replicate" fail to meet your specification?
Since we're »holfing« again: fix $ \xs -> [ 'a':xs | xs <- []:xs ]
6076
Age (days ago)
6076
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kalman Noel