How to define an operator to show a sequence of polymorphic things

Lauri Alanko la@iki.fi
Tue, 22 Apr 2003 19:46:33 +0300


On Tue, Apr 22, 2003 at 04:35:25PM +0100, Malcolm Wallace wrote:
>     infixr #
>     (#) :: (Show b) => (a->b) -> (a->String) -> (a->String)
>     f # g = \t-> show (f t) ++ g t

Or, to avoid unnecessary overhead:

(f # g) t = shows (f t) (g t)


Lauri Alanko
la@iki.fi