% mrdivide - Bind one argument to a function using Matlab closure
%
% mrdivide :: 
%    (A{1:N}->B{1:L}) ~'func from N inputs to L outputs',
%    A{1}             ~'first argument'
% -> (A{2:N}->B{1:L}) ~'func from remaining arguments to returns'.

function g=mrdivide(f,x)
	fns = { @q0, @q1, @(varargin)f(x,varargin{:}) };
	g=fns{1+acount(nargout(f),1)};
	function q0(varargin), f(x,varargin{:}); end
	function y=q1(varargin), y=f(x,varargin{:}); end
end

