My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
let seq_length n = n > Seq.unfold(fun x -> match x with
x when x = 0L -> None
x when x = 1L -> Some((1L,0L))
x when x%2L=0L -> Some((x,x/2L))
_ -> Some((x,3L*x + 1L))
) > Seq.length
[for i in 1L..1000000L -> (i, seq_length i)]
> List.fold1_left(fun (ai,al) (i,l) -> if l > al then (i,l) else (ai,al) )
> (fun (x,y) -> x ) > print_any
Show details Hide details

Change log

r5 by vasiliauskas.agnius on Dec 11, 2008   Diff
euler14 fsharp
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 334 bytes, 9 lines
Hosted by Google Code