[Haskell-beginners] general observation about programming

Theodore Lief Gannon tanuki at gmail.com
Sun Feb 28 01:46:56 UTC 2016


>Those who find this unnatural/difficult/arcane/etc may like to check out
Unix-pipes (or English :-)

But chaining (a la pipes) isn't quite the same as composition. It's better
compared with do-notation, which *does* use the ordering you suggest.

As for English: try pronouncing (.) as "of."
On Feb 26, 2016 10:17 PM, "Rustom Mody" <rustompmody at gmail.com> wrote:

>
>
> On Fri, Feb 26, 2016 at 11:11 PM, Rein Henrichs <rein.henrichs at gmail.com>
> wrote:
>
>> Pointfree is good for reasoning about *composition*. It can often be
>> more readable than pointful code when the focus of the function is on
>> composition of other functions. For example, take this function from Bird's *Pearls
>> of Functional Algorithm Design*:
>>
>>  boxes = map ungroup . ungroup . map cols . group . map group
>>
>
> And better if you read it in the right (ie left to right order)
>
>
> boxes  =  map group >>> group >>> map cols >> ungroup >>> map ungroup
> (From Control.Arrow)
>
> Even better if the 3-char clunky >>> is reduced to the 1-char ⋙
> map group ⋙ group ⋙ map cols ⋙ ungroup ⋙ map ungroup
> (From Control.Arrow.Unicode)
> [Those who find this unnatural/difficult/arcane/etc may like to check out
> Unix-pipes (or English :-) ]
>
> Some wishful thinking in the same direction
> (uses python but python is not really relevant)  :
> http://blog.languager.org/2014/04/unicoded-python.html
> Which to some extent I found works in Haskell :
> http://blog.languager.org/2014/05/unicode-in-haskell-source.html
> If only Haskell would go further!!
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160227/cdc26d85/attachment.html>


More information about the Beginners mailing list