Quick note RE: Euler problem 13

In the post about the solving of the Euler problem 13, I was using an older version of F#, to fix the code, replace the 'N' with an 'I'. So for example, the bigNums collection looks like this:

let bigNums =  [37107287533902102798797998220837590246510135740250I;
46376937677490009712648124896970078050417018260538I;
...
53503534226472524250874054075591789781264330331690I]

And the 'AddNums' method is now:

let rec AddNums n =
    if n < 0 then 0I else AddNums (n-1) + bigNums.[n]

No biggies...

(Apologies for lack of code colouring...)

Print | posted @ Monday, February 8, 2010 10:33 AM

Comments on this entry:

No comments posted yet.

Post A Comment
Title:
Name:
Email:
Comment:
Verification: