前卫管道运营商的怀疑

前卫管道运营商的怀疑

本文介绍了前卫管道运营商的怀疑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

来自本课:

让stockData = [ "2012-03-30,32.40,32.41,32.04,32.26,31749400,32.26"; "2012-03-29,32.06,32.19,31.81,32.12,37038500,32.12"; ..................................................... "2012-03-01,31.93,32.39,31.85,32.29,77344100,32.29"; "2012-02-29,31.89,32.00,31.61,31.74,59323600,31.74"; ] 让splitCommas(x:string)= x.Split([|','|]) stockData |> List.map splitCommas |> List.maxBy(fun x-> abs(float x.[1]-float x.[4])) |> (有趣的x-> x.[0])

为什么我不能使用下面的代码?

(有趣x-> x.[0])( List.maxBy(有趣x-> abs(float x.[1]-float x.[4]))

List.map splitCommas stockData)


解决方案


from the lesson:

let stockData = [ "2012-03-30,32.40,32.41,32.04,32.26,31749400,32.26"; "2012-03-29,32.06,32.19,31.81,32.12,37038500,32.12"; ............................................ "2012-03-01,31.93,32.39,31.85,32.29,77344100,32.29"; "2012-02-29,31.89,32.00,31.61,31.74,59323600,31.74"; ] let splitCommas (x:string) = x.Split([|','|]) stockData |> List.map splitCommas |> List.maxBy (fun x -> abs(float x.[1] - float x.[4])) |> (fun x -> x.[0])

Why I can not use the code below instead? and How can i code without pipe?

(fun x -> x.[0])(List.maxBy (fun x -> abs(float x.[1] - float x.[4]))

List.map splitCommas stockData)


解决方案


这篇关于前卫管道运营商的怀疑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 07:21