lean-ja / lean-by-example

コード例で学ぶ Lean 言語
https://lean-ja.github.io/lean-by-example/
MIT License
51 stars 7 forks source link

Array と比較した List のパフォーマンス上の利点 #1094

Open Seasawher opened 2 weeks ago

Seasawher commented 2 weeks ago

For example, if you want to have a reference to both xs and ys := x :: xs at the same time, there is no problem, but if you want a reference to both as and bs := Array.push as a, this will copy the whole array.

cf. Folding over Array vs. over List