view arrows/@arrf/arrf.m @ 42:ae596261e75f

Various fixes and development to audio handling
author samer
date Tue, 02 Dec 2014 14:51:13 +0000
parents beb8a3f4a345
children
line wrap: on
line source
% arrf - Creat functional arrow using a function factory
%
% arrf :: 
%    FF: (SZ -> (A@typelist(N)->B@typelist(M))) ~'function to create function from sizes',
%    N: natural ~'number of inputs',
%    M: natural ~'number of outputs',
%    options {}
% -> arrow(A@typelist(N),B@typelist(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=options('sizefn',[],varargin{:});
	o=class(struct('fn',ffn,'sizefn',opts.sizefn),'arrf',arrow(nin,nout));
end