Skip to content
Browse files

Sum of Pairs: Haskell solution by Danie Roux

  • Loading branch information...
1 parent 78f12b8 commit 2745f038f21738d292dd2cc0a52f880e2471e4cb @apauley committed Sep 18, 2009
Showing with 2 additions and 4 deletions.
  1. +2 −4 CodeSnippets/SumPairs/sumpairs.hs
View
6 CodeSnippets/SumPairs/sumpairs.hs
@@ -1,4 +1,2 @@
-{- Haskell solution by Danie Roux -}
-
-let x = [1, 2, 3, 4, 5]
-zipWith (+) x (tail x)
+a = [1, 2, 3, 4, 5]
+main = print (zipWith (+) a (tail a))

0 comments on commit 2745f03

Please sign in to comment.
Something went wrong with that request. Please try again.