On Tuesday, 5 August 2014 at 21:10:25 UTC, Tofu Ninja wrote:
Can you explain the utility of both of them? I am not big into functional programming so I am not seeing it.

The purpose of `bindTo` is to emulate the `let` expressions found in many functional languages (see http://en.wikipedia.org/wiki/Let_expression). The idea is to bind a value to a name for the limited scope of a single expression.

Note that `bindTo` could be implemented as:

    alias bindTo = std.functional.unaryFun;

and I'll probably change the implementation to this if this PR will be chosen. The reason I think `bindTo` is needed even if it's just an alias to `unaryFun` is that `bindTo` conveys better that the you are binding a name to a value, not just overcomplicating the code.

Reply via email to