[Haskell-cafe] Why does (++ "!") "bla" return "bla!" and not "!bla"?
Conrad Parker
conrad at metadecks.org
Fri Jun 22 07:02:16 CEST 2012
On 22 June 2012 12:54, Hilco Wijbenga <hilco.wijbenga at gmail.com> wrote:
> 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?
What can you say about ("!" ++) ?
Stripping the infix, what is (++) "bla" "!" ?
Conrad.
More information about the Haskell-Cafe
mailing list