tc39 / proposal-partial-application

Proposal to add partial application to ECMAScript
https://tc39.es/proposal-partial-application/
BSD 3-Clause "New" or "Revised" License
1.02k stars 25 forks source link

Function application is naturally from right to left #25

Closed elycruz closed 6 years ago

elycruz commented 6 years ago

Function application in f(g(a)) is done from right to left though this proposal proposes that it be done from left to right. Should the proposal be from right to left instead (would be in line with the way function application occurs in javascript and more in line with the way most functional languages do the application operator (see haskell's version $ http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelude.html#g:12 )).

ljharb commented 6 years ago

I think “naturally” depends on which language you come from.

elycruz commented 6 years ago

Agreed 👍. Are there ways to make f(g(a)) (in that context) to be applied from left to right in some language (that I don't know of) (or did you just mean natural language?)? (edited original initial comment)

littledan commented 6 years ago

It's not clear to me what this thread has to do with the partial application proposal. Was this in response to the pipeline operator proposal?

elycruz commented 6 years ago

@littledan Hey, yes, though you clarified the direction of the 'partial-application' proposal in https://github.com/tc39/proposal-pipeline-operator/issues/126#issuecomment-399755369. So this issue can be closed.