<div dir="ltr"><div>Hi everyone,</div><div><br></div><div>Sorry if this email disturbs you. I haven't used a developer's mailing list before so I'm not sure if I'm violating any etiquette. If I do, please excuse me.</div><div><br></div><div>I'm trying to understand the type of sequence [Just, Just]. <span style="color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px">I can understand</span></div><div><span style="color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px"> </span><code style="color:rgb(34,36,38);line-height:19.5px;margin:0px;padding:1px 5px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(238,238,238)">sequence [Just 1, Just 2] :: Num a => Maybe [a]</code><span style="color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px"> </span></div><div><span style="color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px"><br></span></div><div><span style="color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px">because when looking at the type of sequence</span><br></div><div><span style="color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px"><br></span></div><pre class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">sequence </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">::</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">Monad m</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> Traversable t</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> t </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">m a</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">-></span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> m </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">t a</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both;color:rgb(34,36,38);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;line-height:19.5px">it is clear that this function takes a collection of monadic values and return a single monadic value of the collection. Thus, when we call <code style="margin:0px;padding:1px 5px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(238,238,238)">sequence [Just 1, Just 2]</code> we should get back a <code style="margin:0px;padding:1px 5px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(238,238,238)">Just</code> of <code style="margin:0px;padding:1px 5px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(238,238,238)">[1,2]</code>. Following that train of thoughts, shouldn't <code style="margin:0px;padding:1px 5px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(238,238,238)">sequence [Just, Just]</code> return a single <code style="margin:0px;padding:1px 5px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(238,238,238)">Just</code>?<br></p><div>Here is the corresponding SO question</div><div><br></div><a href="http://stackoverflow.com/questions/34244574/trouble-understanding-the-type-of-sequence-just-just">http://stackoverflow.com/questions/34244574/trouble-understanding-the-type-of-sequence-just-just</a><br><div><br></div><div>Lim</div></div>