適当に。parser作りまでGW中に行け…ないかな。。。
list = [1,2,3,4,5] main = do print $ mySum list print $ mean list print $ var list -- sumはすでにあるけど、実装してみた mySum :: [Double] -> Double mySum list = foldl (+) 0 list mean :: [Double] -> Double mean list = (mySum list) / fromIntegral (length list) var :: [Double] -> Double var list = (mean $ map (^2) list) - (mean list)^2