Why do I need a list fold to actually deconstruct a tree with this tree catamorphism?

后端 未结 0 1636
长发绾君心
长发绾君心 2020-12-05 04:46

A catamorphism can either deconstruct a value

[1,2,3].reduce((acc, x) => acc + x, 0); // 6

or maintain the structure and act like the iden

相关标签:
回答
  • 消灭零回复
提交回复
热议问题