Thursday, May 17, 2018

Algebraic Data Types in General

Algebraic Data Types in General

In general, an algebraic data type has one or more data constructors, and each data constructor can have zero or more arguments. This specifies that a value of type AlgDataType can be constructed in one of four ways: using Constr1, Constr2, Constr3, or Constr4.

No comments:

Finite-State Machines, Part 1: Modeling with Haskell Data Types

Stateful programs often become complex beasts as they grow. Program state incohesively spread across a bunch of variables, spuriously guar...