File: tplp.curry

package info (click to toggle)
curry-tools 1.0.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,492 kB
  • ctags: 121
  • sloc: makefile: 470; sh: 421
file content (18 lines) | stat: -rw-r--r-- 324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- This example has been taken from:
--   Mar{\'{\i}}a Alpuente and Salvador Lucas and Michael Hanus and Germ{\'{a}}n Vidal
--   Specialization of Functional Logic Programs Based on Needed Narrowing
--   TPLP'05

-- Example 7

data N = O | S N

PEVAL x = x

f O = O

g x = S (f x)

h (S x) = S O

main = h (PEVAL (g (S O)))