Tying the Knot
From HaskellWiki
(Difference between revisions)
| Line 1: | Line 1: | ||
| + | == Introduction == | ||
| + | |||
This example illustrates different ways to define recursive data structures. | This example illustrates different ways to define recursive data structures. | ||
| + | To demonstrate the different techniques we show how to solve the same problem---writing an interpreter for a simple programming language---in three different ways. This is a nice example because, (i) it is interesting, (ii) the abstract syntax of the language contains mutually recursive structures, and (iii) the interpreter illustrates how to work with recursive structures. | ||
| - | == Download the | + | (It would be useful to have some more text describing the examples.) |
| + | |||
| + | == Download the Files == | ||
* [[Image:Interp1.lhs|Direct Recursion]] | * [[Image:Interp1.lhs|Direct Recursion]] | ||
* [[Image:Interp2.lhs|Tying the Knot]] | * [[Image:Interp2.lhs|Tying the Knot]] | ||
* [[Image:Interp3.lhs|Tying the Knot with GADTS]] | * [[Image:Interp3.lhs|Tying the Knot with GADTS]] | ||
| + | |||
| + | |||
| + | [[Category:Code]] | ||
| + | [[Category:Idioms]] | ||
Revision as of 21:56, 10 January 2007
1 Introduction
This example illustrates different ways to define recursive data structures. To demonstrate the different techniques we show how to solve the same problem---writing an interpreter for a simple programming language---in three different ways. This is a nice example because, (i) it is interesting, (ii) the abstract syntax of the language contains mutually recursive structures, and (iii) the interpreter illustrates how to work with recursive structures.
(It would be useful to have some more text describing the examples.)
2 Download the Files
Categories: Code | Idioms
