prof002.hs 257 Bytes
Newer Older
Ian Lynagh's avatar
Ian Lynagh committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

-- This tests trac #931

module Main where

x = f [1..5] (f [2..] [3..])

f xs ys = l
    where
    l = [ if s then x else y | (x, y) <- zip xs ys ]
    s = g xs ys
    g [] _ = True
    g _ [] = False
    g (x:xs) (y:ys) = g xs ys

main = print (show x)