SplitApplyCombine.jl
SplitApplyCombine.jl copied to clipboard
possible to open up types on`innerjoin`?
It looks like the functions given to innerjoin need to be Union{Function, Type}, which precludes callable objects. Would it be possible to remove that restriction?
For some local code I defined (name::Symbol)(x) = getfield(x, name), so I don't have to do so many r->r.foo and can instead just do things like map(:foo, coll), etc. It doesn't work with innerjoin though.
Yes it would be good to support this.
Recently I had moved from Function to include Type as well and expanded the signatures of many of the functions here to accept multiple containers in lieue of functions.
This results in ambiguities between e.g. group(f, array) and group(array1, array2) - here knowing if the first argument is a function/type thing is quite crucial.
Any ideas on the API here are welcome but both those use cases are quite valid. Arguably group could be split into to generic functions though. Thoughts?
By the way I’ve been tempted to make a PR to make 'Symbolcallable like that inBase` - it’s a really nice Clojure feature for example.