2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
3
Task/Fibonacci-sequence/Haskell/fibonacci-sequence-11.hs
Normal file
3
Task/Fibonacci-sequence/Haskell/fibonacci-sequence-11.hs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fib 0 = 0 -- this line is necessary because "something ^ 0" returns "fromInteger 1", which unfortunately
|
||||
-- in our case is not our multiplicative identity (the identity matrix) but just a 1x1 matrix of 1
|
||||
fib n = last $ head $ unMat $ (Mat [[1,1],[1,0]]) ^ n
|
||||
Loading…
Add table
Add a link
Reference in a new issue