samer@0: % arrf - Creat functional arrow using a function factory samer@0: % samer@0: % arrf :: samer@0: % FF: (SZ -> (A:arglist(N)->B:arglist(M))) ~'function to create function from sizes', samer@0: % N: natural ~'number of inputs', samer@0: % M: natural ~'number of outputs', samer@0: % options {} samer@0: % -> arrow(A:arglist(N),B:arglist(M),empty). samer@0: % samer@0: % The type empty denotes the type of empty arrays, ie samer@0: % the state of an arr arrow is always an empty matrix. samer@0: samer@0: function o=arrf(ffn,nin,nout,varargin) samer@0: opts=prefs('sizefn',[],varargin{:}); samer@0: o=class(struct('fn',ffn,'sizefn',opts.sizefn),'arrf',arrow(nin,nout)); samer@0: end