whats the correct way to write a function that can accept different input's and have different outputs
for example i'm using hmatrix and lets say i want to accept a Matrix or a Vector in my function, and the output can be a Matrix or a Vector depending on hte formula where T in the below example can be a matrix or a vector , is maybe the right tool for this?
Myfunc ::(Matrix A, Matrix/Vector T) -> Maybe(Matrix/Vector T)
Update using either mentioned below here is one possible solution
Myfunc :: Maybe Matrix Double t -> (Either Vector Double a,Matrix Double a) -> Either (Matrix Double T,Vector Double T)