This is an interesting approach. Haskell is not a symbolic language, but you take advantage of the abstractness of type parameters in function definitions to thread your implementation of "D x" through, and pattern match on that.
It's a neat design pattern. I bet it'd work in Julia too.
It's a neat design pattern. I bet it'd work in Julia too.