move generic function definitions into a separate file
fix function signature
basis_bs() to create B-spline basis
fd_new() to create fd+ object