Rivoreo Source Code Repositories
src.rivoreo.one
/
compiler-explorer
/
6f7a4b8b4a815b2277b8e3152790f239dc21ce5d
/
.
/
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
]