File: enum.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 (10 lines) | stat: -rw-r--r-- 245 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
enumFT a b = if (a > b) then [] else (a : enumFT (a + 1) b)
--enumFT a b = ite (a>b) [] (a : enumFT (a+1) b)
--ite True  a b = a
--ite False a b = b

goal n = PEVAL (enumFT 1 n)

main = goal 10

-- main "enum" [(Comb FuncCall "enum_g" [Var 0])]