Function application function in Haskell

前端 未结 3 807
说谎
说谎 2020-12-20 18:28

Let\'s say I have a list of functions

functions = [f, g, h]

each one with type a -> a

I also have a list of values

3条回答
  •  一生所求
    2020-12-20 19:17

    Strangely enough,

    zipWith id functions vals
    

    will work too!

    But, really, zipWith ($) is the right way to write this.

提交回复
热议问题