[Matlab] Add named constructors for functors

This commit is contained in:
ssun30 2022-04-21 21:34:26 -04:00 committed by Ray Speth
parent 21980e6e6f
commit 71fc640f56
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,5 @@
function r = fplus(a, b)
% Get a functor representing the sum two input functors 'a' and
% 'b'.
r = Func('sum', a, b);
end

View File

@ -0,0 +1,5 @@
function r = frdivide(a, b)
% Get a functor that is the ratio of the input functors 'a' and
% 'b'.
r = Func('ratio', a, b);
end

View File

@ -0,0 +1,4 @@
function r = ftimes(a, b)
% Get a functor that multiplies two functors 'a' and 'b'
r = Func('prod', a, b);
end