[Haskell-beginners] dealing with chained functions
alecbenzer at gmail.com
Sun Sep 5 03:50:25 EDT 2010
A) is all I was really asking. I'm not writing a library or exposing
any functions. I was concerned with how I should write the internals,
although I see how in certain contexts the latter form may be
preferable if I was writing a library.
On Sun, Sep 5, 2010 at 3:41 AM, Chaddaï Fouché <chaddai.fouche at gmail.com> wrote:
> On Sat, Sep 4, 2010 at 10:06 AM, Alec Benzer <alecbenzer at gmail.com> wrote:
>> No, ya, I get that differences between the two methods, I was asking
>> if one of them was generally considered better practice than the
> I think your question is mixing two different concern : A) how you
> should write your Haskell functions so that you reap most benefit from
> its functional nature, and B) what functions you should expose in the
> interface of your libraries.
> The answer to A) is that you should use the solution that is more
> composable (the former), the answer to B) really depends on what your
> library does and the philosophy of your interface... In other words,
> it may be better in your specific case to expose the latter functions
> (probably not often but it may happen) but the internals of your
> library should most likely be written in the former style (it is easy
> to form the latter functions from the former, while the opposite is
> quite impossible).
More information about the Beginners