forall quantifier
Tomasz Zielonka
t.zielonka@students.mimuw.edu.pl
Wed, 4 Jun 2003 16:35:36 +0200
On Wed, Jun 04, 2003 at 02:46:59PM +0200, Markus.Schnell@infineon.com wrote:
>
> Now I want to print part of the record. What I would like to do is the
> following
> > putStrLn $ concatMap show [a,c,d]
>
> !!! bang !!!
>
> So what I actually do is
> > putStrLn $ concat [show a, show c, show d]
>
> Works, but a little bit clumsy, especially with long lists.
> Is there a nice solution?
You can do something like this:
infixr 5 +++
(+++) :: Show a => a -> [String] -> [String]
a +++ l = show a : l
concat $ a +++ b +++ c +++ []
Best regards,
Tom
--
.signature: Too many levels of symbolic links