haskell - Get the minimum value -
i have function 'getmin' should return minimum value. function uses function 'urvalfun' in order determine minimim value. here demonstration of 'urvalfun' get1:: (string,string,double ) -> string get1 (x,_,_ ) = x get2 :: (string,string,double)-> string get2 (_,x,_) = x get3:: (string,string,double)->double get3 (_,_,x) = x distdiff:: string-> string->[(string,string,double)] ->double distdiff b dimat = sum [z |(x,y,z)<- dimat, (x == && y /= b) || (y == && x /= b) ] urvalfun:: int -> (string,string,double)->[(string,string,double) ]->double urvalfun size triple dimat = ((fromintegral size)-2)*(get3 triple) - ( (distdiff (get1 triple) (get2 triple) dimat ) + (distdiff (get2 triple) (get1 triple) dimat )) its not necessary understand chunck of code, thing important if evaluate: urvalfun 3 ("a","b",0.304) [("a","b",0.304),("a",...