2008/2/5, Neil Mitchell <[EMAIL PROTECTED]>:
> 3)
> insert x y = delete  x
>          >>> deleteR y
>          >>> unsafeInsert x y
>
> Why not:
>
> insert x y = unsafeInsert x y . delete x . delete y
>
> Now you don't end up using the arrow combinators, and it becomes more
> readable (at least to me). Of course, this function may disappear
> entirely if what I wrote in (2) is correct.

I'd rather prefer the arrow combinator: it let me read the composition
in natural order. Sure, ">>>" is more verbose than ".", and less
idiomatic, but I tend to think it scale a bit more (in the case of
bigger compositions). Well, maybe just a matter of taste...

Loup
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to