Exactly three adjacent 3 in lists: Difference between revisions
m
→{{header|Haskell}}
(→{{header|Wren}}: Code is in fact correct - always returns false if there are more than 3 threes, adjacent or not. Added more examples to demonstrate this is so.) |
|||
Line 49:
nnPeers :: Int -> [Int] -> Bool
nnPeers n xs =
let
in
&& any
(group xs)
|