{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreieq5bqpsbivzg2lxbrpunx3qwx3zhq7is36ir2adb5k5w3bkzid2q",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mevcivkxekz2"
},
"path": "/t/minimal-processing-of-continued-fractions/13689#post_4",
"publishedAt": "2026-02-15T09:48:12.000Z",
"site": "https://discourse.haskell.org",
"textContent": "Ok I think I see the loop in your second block. You have an element so you call emit on the empty list and your matrix. That immediately turns the empty list and the matrix again because c == 0 from the initial state. The empty list is then concatenated with go called with the same inputs as it started, meaning you infinitely concatenate the empty list.\n\nMy recommendation here would be to make sure that you always reduce your list length if possible, because at least then your algorithm will be finite.",
"title": "Minimal processing of continued fractions"
}