File: ppdp07.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 (15 lines) | stat: -rw-r--r-- 343 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- This example has been taken from:
--   L\'{o}pez-Fraguas, Francisco Javier and Rodr\'{\i}guez-Hortal\'{a}, Juan and S\'{a}nchez-Hern\'{a}ndez, Jaime
--   A Simple Rewrite Notion for Call-time Choice Semantics
--   PPDP '07

PEVAL x = x

coin = 0
coin = 1

repeat x = x : repeat x

heads (x:y:_) = (x, y)

main = PEVAL (heads (repeat coin))