Re: [Haskell-cafe] Re: Query on list comprehension

18 Mar
2009
18 Mar
'09
1:57 p.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 ]
5956
Age (days ago)
5956
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kalman Noel