add ghc haskell and go version for e2
This commit is contained in:
parent
9e2179f2d8
commit
bb6dc490ca
|
@ -0,0 +1,5 @@
|
|||
fibsum prev curr acc max | curr > max = acc
|
||||
| rem curr 2 == 0 = fibsum curr (prev + curr) (acc + curr) max
|
||||
| otherwise = fibsum curr (prev + curr) acc max
|
||||
|
||||
main = print (fibsum 1 1 0 4000000)
|
Loading…
Reference in New Issue