Quest 1: Whispers in the Shell

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

Link to participate: https://everybody.codes/

you are viewing a single comment's thread
view the rest of the comments

What do the .s mean in addWith f = (f .) . (+)?

  • source
  • parent
  • hideshow 2 child comments
  • [โ€“] 3 points 8 months ago*

    . means function composition in Haskell. (f .) . (+) is just an obscure way to write \x y -> f (x + y). It's not recommended to use this point-free style in production code, but it is sometimes fun to experiment with for challenges like this.

  • source
  • parent