forall quantifier

Lauri Alanko la@iki.fi
Wed, 4 Jun 2003 16:07:01 +0300


On Wed, Jun 04, 2003 at 02:46:59PM +0200, Markus.Schnell@infineon.com wrote:
> 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?

One way is to define a special (polymorphic) combinator instead of
forcing everything into a list:

infixr |+
a |+ b = shows a b

and then just:

putStrLn $ a |+ c |+ d |+ ""

This is hopefully reasonably concise.


Lauri Alanko
la@iki.fi