Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- isSeq ::[Int]->Bool
- isSeq [] = False
- isSeq [x] = False
- isSeq [x,y] = True
- isSeq (x:y:z:xs) = (x - y) == (y - z) && isSeq (y:z:xs)
- getArithSeqs :: [[Int]]->[[Int]]
- getArithSeqs array = filter isSeq array
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement