ϵ">]>
Literature.
[1] J. Komara. Declarative Programming. Downloadable lecture notes available through the web page of the course.
[2] J. Kľuka. Lecture Notes from Introduction to Declarative Programming.
[3] J. Komara and P. J. Voda. Metamathematics of Computer Programming. 2001.
Formulation of the problem. For a given unary function , write a program which makes a table of its values
Type signature
Example. For the factorial function , the application should return an XHTML document similar to that below.
Exercise. Define the function which makes a table row (tr-element) with a data cell (td-element) containing the number . Type signature:
Exercise. Define the function which makes a table (table-element) from the list of numbers. The table has one column and its height is . Type signature:
0! | = | 1 |
1! | = | 1 |
2! | = | 2 |
3! | = | 6 |
4! | = | 24 |
5! | = | 120 |
6! | = | 720 |
7! | = | 5040 |
8! | = | 40320 |
9! | = | 362880 |
10! | = | 3628800 |