julia
6e715da0 - Refactor Functors into their own file

Commit
11 years ago
Refactor Functors into their own file Add a new BitFunc abstract type to group Functors that behave in the same bit-wise manner when applied to individual bits as well as integers, allowing them to be used on the BitArray chunks. Add methods for Functor specialization-by-function value. When no Functor matches, an UnspecializedFunc is returned that simply wraps the function. This should make dispatch simpler when using functors: ``` foo(f::Callable, ...) = foo(specialized_(f), ...) function foo(f, ...) # actual implementation here end ```
Author
Committer
Parents
Loading