Haskell shying away from probabilistic data structures?

前端 未结 7 1001
时光说笑
时光说笑 2021-02-05 07:57

If you search for skips lists implemented in Haskell, you won\'t find many. It is a probabilistic data structure needing a random number generator, meaning that any of these str

7条回答
  •  自闭症患者
    2021-02-05 08:52

    Since skiplists have a pure interface, it would be valid to make an implementation using IO internally and to wrap that with unsafePerformIO for the interface. This simply moves the burden of "getting it right" from the language to the programmer (which is where the burden always lies in impure languages).

提交回复
热议问题