Re: Preferred syntax for append
Olaf Klinke <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cafe |
|---|---|
| Message-ID | <[email protected]> |
> Concatenation with (<>) is more meaningful and holds better semantics > than (<|>), described as just "An associative binary operation". (<>) is also "just an associative binary operation", no more guarantees than (<|>). That said, for append (<>) should be preferred over (<|>) because one can then switch to more efficient append implementations just by changing the type signature, e.g. when switching from String to Text: The former is an Alternative, the latter ist not. (<|>) for list models non-deterministic choice, which can be useful in combinatorial problems. Olaf _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.