Last active
February 23, 2019 00:50
-
-
Save ConnorBaker/625e8b76dd91ca8942f64c8ce0e1ec88 to your computer and use it in GitHub Desktop.
Programming in Haskell, 2nd ed.: Chapter 5: Problem 9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chisqr :: [Float] -> [Float] -> Float | |
| chisqr os es = sum [((o-e)^2)/e | (o,e) <- zip os es] | |
| scalarproduct :: [Int] -> [Int] -> Int | |
| scalarproduct xs ys = sum [x*y | (x,y) <- zip xs ys] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment