<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Sebastian Fisher wrote:</div><div><br><blockquote type="cite"><span class="Apple-style-span" style="font-family: arial, sans-serif; "><div>The nested monadic tails of your lists seem more similar to the nested monadic data described in the ICFP'09 paper with Oleg Kiselyov and Chung-chieh Shan [1].&nbsp;The ideas described in that paper are on Hackage and your ListT seems similar to the List type in Data.Monadic.List [2]&nbsp;although our version not only uses monadic tails but also monadic heads. See&nbsp;[3]&nbsp;for a tutorial.&nbsp;</div></span></blockquote><div><font class="Apple-style-span" color="#144FAE" face="arial, sans-serif"><br></font></div></div><div>A small correction: the tail of ListT is not monadic, but "unpacking" it (getting either a Nil or a Cons) is.</div><div>If just the tail was monadic&nbsp;one couldn't create a list which might be empty depending on a monadic result,</div><div><br></div><div>For example:</div><div><br></div><div>linesFromUser :: ListT IO String</div><div>linesFromUser = takeWhile (not . null) . joinM $ repeat getLine</div><div><br></div><div>linesFromUser is a list of lines from the user until an empty line, not including the empty line.</div><div>the first line entered by the user determines if the list is empty or not.</div><div><div><br></div><div>cheers,</div><div>Yair</div><div><br></div></div></body></html>