Open ssfrr opened 4 years ago
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 in
Base` - it’s a really nice Clojure feature for example.
It looks like the functions given to
innerjoin
need to beUnion{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 manyr->r.foo
and can instead just do things likemap(:foo, coll)
, etc. It doesn't work withinnerjoin
though.