
19 Oct
2006
19 Oct
'06
7:01 p.m.
On Thu, Oct 19, 2006 at 04:03:38PM +0200, Mikael Johansson wrote:
isIdentity (PL xs) = all (\(i,j) -> i==j) (zip [1..] xs)
isIdentity (PL xs) = xs == [1..(length xs)]
How about a compromise? isIdentity (PL xs) = xs == zipWith const [1..] xs Best regards Tomasz