How does one use cached data in a functional language such as Erlang?

后端 未结 3 686
眼角桃花
眼角桃花 2020-12-30 04:08

I\'ve been reading a bit lately about functional languages. Coming from 10+ years of OO development, I\'m finding it difficult to get my head around how on earth one can poi

3条回答
  •  抹茶落季
    2020-12-30 04:21

    Memoize the function. A cache is just a list/dictionary, and hence can be implemented in a purely functional way.

提交回复
热议问题