File: Various.curry

package info (click to toggle)
curry-tools 3.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,764 kB
  • sloc: perl: 282; ruby: 154; makefile: 119; sh: 106
file content (11 lines) | stat: -rw-r--r-- 209 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
-- Various test functions

import Test.Prop

f :: Data a => [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