Closed mpickering closed 7 years ago
Yes, it used to have a concatenation function, but it has been removed when I changed the implementation to use SmallArray. Do you think that function is useful? I've never needed it
I am writing benchmarks of different anonymous records libraries so I don't have any direct need for it if you don't want to include it in the API.
Concatenation function is actually quite handy when using your library for plain extensible products.
I'm using extensible to pass a bunch of otherwise unrelated dependencies through my code. I have a bunch of small functions that require different services and need to combine them. Instead of defining a huge record type with everything I need and pass it around, I make all small functions polymorphic over an extensible product and sprinkle a bunch of 'Member' constraints (so that every small function requires only a small subset of services). Then I actually create extensible product filled with anything I might ever need and just pass it to my combined functions.
When actually creating that extensible product, concatenation gets quite useful! Please consider adding it to future releases.
Shipped v0.4.5. Thanks @anton-dessiatov !
Is it possible to provide a function which appends two anonymous records (which contain different fields) together?