Rivoreo Source Code Repositories
src.rivoreo.one
/
compiler-explorer
/
7b2e92d8133f3739a19a0a58fdcdb75f55ed3a4c
/
.
/
examples
/
haskell
/
Sum_over_array.hs
blob: 9ed352627fecb7d1ad7bb82081b7c6f98d361794 [
file
] [
log
] [
blame
] [
raw
]
sumOverArray
::
[
Int
]
->
Int
sumOverArray
(
x
:
xs
)
=
x
+
sumOverArray xs
sumOverArray
[]
=
0
main
=
return
$
sumOverArray
[
1
,
3
,
4
]