Is there an inverse of the Haskell $ operator?

前端 未结 6 412
感情败类
感情败类 2021-02-01 13:44

A quick question, is there an operator in Haskell that works like the dollar sign but gives precedence to the left hand side. I.E. instead of

f (x 1) 
         


        
6条回答
  •  伪装坚强ぢ
    2021-02-01 14:21

    I am not aware of any standard version, but I've seen (#) used for that purpose in a couple places. The one in particular that comes to mind is HOC, which uses it in an idiom like:

    someObject # someMessage param1 param2
    

    I seem to recall seeing other "object-oriented" libraries using the # operator in the same way, but cannot remember how many or which ones.

提交回复
热议问题