ϵ">]>
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.
[CL] Formatting the output. Use the format to display numbers in the list representation. For instance, the result of the query is shown as the expression . Note that the predicate is defined in the module Standard.
[CL] List membership. The list membership predicate is defined in the module Standard:
Notation. We write for the application and for its negation .
[CL] Remark. The list concatenation function , written as , is defined in the module Standard.
Elements with even and odd indices. Define the functions and such that
and
Hint. Use the following discrimination: