Are some data structures more suitable for functional programming than others?

后端 未结 9 704
灰色年华
灰色年华 2021-01-31 19:23

In Real World Haskell, there is a section titled \"Life without arrays or hash tables\" where the authors suggest that list and trees are preferred in functional programming, w

9条回答
  •  春和景丽
    2021-01-31 19:43

    As far as hash tables in functional languages go: Since ACL2 was mentioned above, I'll note that there is a "hash cons" library for ACL2 that provides the logical story that's basically association-list-semantics but has the performance of a hashtable (e.g., you can lookup a value in a table using hons-get). If you're interested, check out the topic "hons" in the ACL2 users Manuals.

提交回复
热议问题