What are “sums-and-products” data structures?

后端 未结 4 541
感情败类
感情败类 2020-12-04 07:29

A recent blog post on William Cook\'s Fusings mentions:

The key point is that structures in Ensō are viewed holistically as graphs, not as individual

4条回答
  •  醉梦人生
    2020-12-04 07:55

    He is referring to the standard algebraic data types of functional programming languages.

    Examples:

    • If a is of type A and b is of type B then (a, b) is of type A x B, which is a product type.

    • A list type with values of the form Nil or Cons x xs is a sum type.

    Ensō apparently has a greater emphasis on graphs than these tree-like algebraic types.

提交回复
热议问题