[Haskell-cafe] Using streams to clarify (?) the signature of Data.Text.replace
Richard A. O'Keefe
ok at cs.otago.ac.nz
Tue Jun 28 23:05:13 UTC 2016
On 27/06/16 7:17 PM, Daniel Díaz wrote:
> Considering partial application, the order that makes the most sense is
>
> - what to look for
> - what to replace it with
> - the big string to search and replace in
>
>
> Interesting, I forgot that the order of parameters can tell you things
> about how they are used. Did you arrive at your conclusion by assuming
> the "most variable" arguments come last?
No, by considering "what would be most useful as a specialisation".
It's different psychologically, but not, I believe, pragmatically.
Of course, that approach only worked this time because whoever designed
the function must have done some similar thinking.
More information about the Haskell-Cafe
mailing list