September 2, 2006 at 3:19 pm · Filed under Functional Programming, Computer Science
Bookmark on del.icio.us
I had this idea a few weeks ago, of merging the syntactical features of algebraic data types with the implementation freedom of abstract data types. Coming to think about it, I had this idea in 1988, when I created an equational "mathematics" system on top of Prolog.
Most people having dealt with declarative languages have encountered [...]
July 31, 2006 at 5:07 pm · Filed under Functional Programming, Computer Science
Bookmark on del.icio.us
An algebraic data type is a type defined via constructors that can subsequently – often in a functional language setting – be used in pattern matching. The typical example is (using Haskell syntax):
PLAIN TEXT
HASKELL:
data IntStack = Empty | Cons Int IntStack
One can view the type constructors (Cons and Empty above) as regular functions acting on [...]