nobsun #6427(2008/06/04 03:01 GMT) [ Haskell ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10
import Data.List check :: [Int] -> Bool check xs = all foo $ tails xs where foo [] = True foo (x:xs) = all (EQ /=) &&& ((1 >=) . length . group) $ map (compare x) xs (&&&) :: (a -> Bool) -> (a -> Bool) -> (a -> Bool) (p &&& q) x = if p x then q x else False
Rating0/0=0.00-0+
[ reply ]
nobsun
#6427()
[
Haskell
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]