<div dir="ltr">There's Foldable for 'things that can be converted to lists', or Traversable for 'things that can be converted to lists underneath a Functor'.<div><br></div><div><a href="https://wiki.haskell.org/Foldable_and_Traversable">https://wiki.haskell.org/Foldable_and_Traversable</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 22, 2016 at 10:47 PM, Erik de Castro Lopo <span dir="ltr"><<a href="mailto:mle+hs@mega-nerd.com" target="_blank">mle+hs@mega-nerd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Christopher Howard wrote:<br>
<br>
> Hi. I'm more in the shallow end of the Haskell pool right now, so<br>
> forgive me if this is really basic... In Haskell, what is the class for<br>
> things that can provide an infinite sequence?<br>
<br>
</span>People generally do this with lists and Haskell's lazy evaluation. For<br>
instance:<br>
<br>
    let x = [1 .. ]<br>
<br>
produces the infinite list [1,2,3, .....].<br>
<br>
Haskell's lazily evaluated lists allow for incredibly elegant solutions<br>
for some sorts of problems, like the spigot algorithm for generating<br>
(among other things) the digits of PI:<br>
<br>
    <a href="http://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/spigot.pdf" rel="noreferrer" target="_blank">http://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/spigot.pdf</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Erik<br>
--<br>
----------------------------------------------------------------------<br>
Erik de Castro Lopo<br>
<a href="http://www.mega-nerd.com/" rel="noreferrer" target="_blank">http://www.mega-nerd.com/</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>