Replace the double dispatch trick by multidispatch!

Fix #38.
Merge pull request #49 from sebcrozet/multidispatch

Replace the double dispatch trick by multidispatch!