仕様書の1.1.4に
Pipelining demonstrates one way in which F# supports compositionality, a key concept in functional programming. The pipeline operator simplifies the process of writing compositional code where the result of one function is passed into the next.
ってあるんですけど、compositionalityとかcompositional codeってあまり聞いたことなくて、これって要はcomposablityとかcomposable codeってことが言いたいんでしょうか?
Compositionality: the properties of interest at system level can be determined from relevant properties of its constituent components
Composability: the properties determined for individual components in isolation should hold in the face of composition with other components
という文を見つけました:http://www.ada-europe2013.org/talks/S9T2%20Baldovin.pdf
Programming F#の原著のExample3-3 Functions returns functionsで、
> // Functions returning functions
let generatePowerOfFunc baseValue =
(fun exponent -> baseValue ** exponent);;
val generatePowerOfFunc : float -> float -> float
> let powerOfTwo = generatePowerOfFunc 2.0;;
val powerOfTwo : (float -> float)
> powerOfTwo 8.0;;
val it : float = 256.0
> let powerOfThree = generatePowerOfFunc 3.0;;
val powerOfThree : (float -> float)
> powerOfThree 2.0;;
val it : float = 9.0
という例があって、そこに説明として
If you look closer at our generatePowerOfFunc function, you’ll notice that its parameter
baseValue is used in the two lambdas it returned.
とありますけど、これが言っている意味(two lamdas?1個しかないように見える)が分かりません。