<div dir="ltr">The type of the cons operator (:) is<div><br></div><div><font face="monospace, monospace"> (:) :: a -> [a] -> [a]</font></div><div><font face="monospace, monospace"><br></font></div>The way you are invoking it expects it to have the type<div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> (:) :: a -> Maybe [a] -> [a] -- not valid</font></div><div><font face="monospace, monospace"><br></font></div>One solution is to write such a function yourself, while the other would be to rewrite your code to invoke it correctly.</div><div class="gmail_extra"><br><div class="gmail_quote">On 12 May 2015 at 19:46, Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, May 12, 2015 at 10:11 AM, Roelof Wobben <span dir="ltr"><<a href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>I do not understand what you are saying to me.<br>
<br>
I know that init produces a Maybe [a] . That is why I did put a
Just before it.<br>
</div></div></blockquote><div><br></div></span><div>You are invoking it again though, and using its result as if it produces [a] instead of Maybe [a].</div></div><span class=""><div><br></div>-- <br><div><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</span></div></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Regards</div><div dir="ltr"><div><br></div><div>Sumit Sahrawat</div></div></div></div></div></div></div>
</div>