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