Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • \$\begingroup\$ Is this infinite, or does it take n? \$\endgroup\$ Commented Feb 18, 2016 at 23:13
  • \$\begingroup\$ @mbomb007 With Integer, it will continue until you run out of memory (or patience). It'll continue with Int, but will start giving wrong answers once it overflows (> 2^29-1). \$\endgroup\$ Commented Feb 18, 2016 at 23:15
  • \$\begingroup\$ Can you link to an interpreter where I can run this? I pasted it into TryHaskell.org and it didn't work. \$\endgroup\$ Commented Feb 19, 2016 at 21:55
  • \$\begingroup\$ @mbomb007 Best I've found so far is this, though it needs main=print$ that GHCi does not. GHC.io runs out of memory and TryHaskell.org's feature set is too limited. \$\endgroup\$ Commented Feb 20, 2016 at 10:10
  • \$\begingroup\$ Wow, it doesn't get very far before timing out. :D \$\endgroup\$ Commented Feb 21, 2016 at 4:53