Chaining Applicatives I wrote this code to append Maybe's:

ghci&gt; (:) &lt;$&gt; Just 5 &lt;*&gt; ((:) &lt;$&gt; Just 100 &lt;*&gt; Just [])
Just [5,100]


Similarly:

ghci&gt; (:) &lt;$&gt; Just 5 &lt;*&gt; ( (:) &lt;$&gt; Just 10 &lt;*&gt; ((:) &lt;$&gt; Just 100 &lt;*&gt; Just []) )
Just [5,10,100]


Is this code idiomatic? Perhaps there's a more concise way to append a bunch of Maybe's together?
Well, while the code surely works, it does look ugly. I would suggest something like this:

sequence [Just 5, Just 10, Just 100]


or, if you really want to use Applicatives instead of Monads,

sequenceA [Just 5, Just 10, Just 100]


from Data.Traversable.