Applying multiple functions to the same value point-free style in Haskell

后端 未结 4 639
醉酒成梦
醉酒成梦 2021-02-01 16:14

I was bored one day and wanted to exercise my brain, so I decided to do the 99 Haskell Problems but restricted myself to doing them in point-free style. A problem that seems to

4条回答
  •  既然无缘
    2021-02-01 16:57

    Use sequence:

    > let foobar' = sequence [id, reverse]
    > foobar' "abcde"
    ["abcde","edcba"]
    

提交回复
热议问题