[Haskell-cafe] Why does (++ "!") "bla" return "bla!" and not "!bla"?

Hilco Wijbenga hilco.wijbenga at gmail.com
Fri Jun 22 06:54:10 CEST 2012


Hi all,

I'm going through the excellent http://learnyouahaskell.com tutorial.
So far it's been pretty easy to follow but now I ran into something
that (when I later started reading about maps) do not seem to fully
grasp.

I think I'm close to understanding why (++ "!") "bla" returns "bla!
instead of "!bla" but I seem to be missing the last step. :-) I
noticed that ((++) "!") "bla" does indeed return "!bla". So it seems
to be related to the infix property of ++? The types of (++) "!",
((++) "!"), and (++ "!") are all the same so that doesn't tell me
much.

Would someone please nudge me in the right direction?

Cheers,
Hilco



More information about the Haskell-Cafe mailing list