[ ^ CSE 341 | section index | next -->]

CSE 341 -- 25 May 2000


Final thoughts on Miranda and FP

Constructors are functions

A type constructor is really just a special kind of function:

expr ::= NumExpr num | CharExpr char NumExpr:: num->expr

Contrast this with Java, where constructors have special semantics.

Functional style

Functional style can be very powerful and useful even in non-functional languages. Many people believe that functional style leads to clearer, more concise, and more flexible programs. Elements of functional style:


Last modified: Wed May 24 20:01:09 PDT 2000