Curry: Example Programs

Here is a collection of (small) Curry programs. References to larger applications can be found here. Usually, each program contains some example goals at the end in order to see its intended application.


The programs are sorted by the main language features they use so that people interested in the various features of Curry can look at these examples:

Purely functional programs:


Purely logic programs:


Functional logic programs:


Non-deterministic operations:


Passive constraints (logic programming with coroutining):


Residuation and concurrent programming:


Input/Output (monadic I/O):


Arithmetic sequences and list comprehensions:


Modules:


Comparison with Escher:

Here are a few examples that are implementations of programs from John Lloyd's papers on Escher.
Back to Homepage of Curry
Michael Hanus