File: Various.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 (11 lines) | stat: -rw-r--r-- 196 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
-- Various test functions

import Test.EasyCheck

f :: [a] -> [a] -> a
f xs ys | xs == _++[x] && ys == _++[x]++_ = x   where x free

main :: Int
main = f [1,2] [2,1]

test_f = f [1,2] [2,1] -=- 2