Created
April 17, 2020 10:14
-
-
Save jeetu7/619f68c637d0d6dff972352774491a79 to your computer and use it in GitHub Desktop.
This file contains 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
module Main | |
import Data.List | |
mySum : List Double -> Double | |
mySum [] = 0 | |
mySum (x :: xs) = x + mySum xs | |
ms : List Double | |
ms = [1.0, 2.0, 3.0] | |
bs : List Double | |
bs = [] | |
main : IO () | |
main = do printLn $ sum ms | |
printLn $ mySum ms | |
printLn $ mySum bs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment