functional programming: immutable data structure efficiency

后端 未结 4 1660
灰色年华
灰色年华 2020-12-13 11:09

I don\'t understand, how FP compilers make the code dealing with immutable data structures fast, not blow up stack, etc.

For example, insert operation in tree, it ha

4条回答
  •  感情败类
    2020-12-13 11:17

    If the garbage collector is doing its job, the older copies of the data structure will be reclaimed when they're no longer being used.

提交回复
热议问题