Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can a directed graph be efficiently represented in a purely functional language like Haskell? Could someone suggest relevant materials on this topic? (functional pearls perhaps?) Thanks.
There are many reasonable approaches, but one is an adjacency list representation. You can use any convenient data structure for the adjacency list; I anticipate that a dictionary (ordered map) will be useful.
Required, but never shown