
13 May
2024
13 May
'24
5:12 p.m.
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