view arrows/@arrf/arrf.m @ 6:0ce3c2070089

Removed duplicate code and fixed doc in timed_action.
author samer
date Mon, 14 Jan 2013 14:33:37 +0000
parents 672052bd81f8
children 5de03f77dae1
line wrap: on
line source
% arrf - Creat functional arrow using a function factory
%
% arrf :: 
%    FF: (SZ -> (A:arglist(N)->B:arglist(M))) ~'function to create function from sizes',
%    N: natural ~'number of inputs',
%    M: natural ~'number of outputs',
%    options {}
% -> arrow(A:arglist(N),B:arglist(M),empty).
%
% The type empty denotes the type of empty arrays, ie
% the state of an arr arrow is always an empty matrix.

function o=arrf(ffn,nin,nout,varargin)
	opts=prefs('sizefn',[],varargin{:});
	o=class(struct('fn',ffn,'sizefn',opts.sizefn),'arrf',arrow(nin,nout));
end