Slightly offtopic to the question at hand, there is one implementation of day count conventions here: https://github.com/aviks/Ito.jl/blob/master/src/time/day_count.jl
On Sunday, 20 April 2014 09:31:40 UTC+1, MikeEI wrote: > > I hope not too contrived, just for learning the Julia style: > Let's say one wants to implement different day count methods that have > same argument types (enddate, begindate), using (-), means not using > different function names. Which way would You recommend to realize > something like this: > (-) (enddate, begindate) = (alg for # of calendrical days in between) > (-) (enddate, begindate) = (alg for # of interest days in between) > (-) (enddate, begindate) = (alg for # of work days in between) > > Could it be done via multiple dispatch and different return type? > Or via higher order function, defining subtraction beforehand? > Or does the "problem" just require different function names? > > >