view general/funutils/compose.m @ 12:fbc0540a9208

Moved some high-order functions from funutils to arrutils, updated docs and cleaned up funutils.
author samer
date Mon, 14 Jan 2013 22:21:11 +0000
parents e44f49929e56
children
line wrap: on
line source
function h=compose(f,g)
% compose - Constructs composition of two functions
%
% compose :: (B->C), (A{1:N}->B) -> (A{1:N}->C).
%
% returns the function h such that h(...) = f(g(...))

	h=@fg;
	function x=fg(varargin), x=f(g(varargin{:})); end
end