Hacker News new | ask | show | jobs
by eru 5709 days ago
Look into Okasaki's "Purely Functional Datastructures" for an example on how to handle cycles. He talks about double ended queues, which can obviously interpreted as a graph with a single cycle.