What is “point free” style (in Functional Programming)?

前端 未结 5 1147
情深已故
情深已故 2020-11-27 12:33

A phrase that I\'ve noticed recently is the concept of \"point free\" style...

First, there was this question, and also this one.

Then, I discovered here the

5条回答
  •  鱼传尺愫
    2020-11-27 13:00

    Point free style means that the code doesn't explicitly mention it's arguments, even though they exist and are being used.

    This works in Haskell because of the way functions work.

    For instance:

    myTake = take
    

    returns a function that takes one argument, therefore there is no reason to explicit type the argument unless you just want too.

提交回复
热议问题