inp is of type ('a *float) list, so the inp.Map line has to be changed to

(List.map (fun (x,v) -> (x,(float v/float total))) inp)

The warning can be eliminated via replacing List.sumByInt with
List.sum_by (fun (_,v) -> v)

(Haven't tried it out, but should be correct as far as I see)

By on 3/8/2009 6:49 AM ()

The warning is the not problem; error is the problem.

By on 3/9/2009 7:46 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper