News for hackers. Stuff that matters.
Re:Opinions on functional programming and OCaml by phillipcarter on Saturday December 23, 2017 @04:42PM (#15996408)
I'm really into partial application when you wish to mock some data for testing, and the caller chain of that test is shallow. That is:

* function under test takes in a data as its last parameter

* partially applied version of this function is used in a test

* testing function constructs fake data

* testing function calls the partially applied version

It's also nice for code reuse in libraries, but I'm generally less inclined to use it unless I know that the thing I'm working on has dead-simple requirements and won't change much.

There are no comments on this comment yet.