annotate 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 |
rev |
line source |
samer@0
|
1 % arrf - Creat functional arrow using a function factory
|
samer@0
|
2 %
|
samer@0
|
3 % arrf ::
|
samer@0
|
4 % FF: (SZ -> (A:arglist(N)->B:arglist(M))) ~'function to create function from sizes',
|
samer@0
|
5 % N: natural ~'number of inputs',
|
samer@0
|
6 % M: natural ~'number of outputs',
|
samer@0
|
7 % options {}
|
samer@0
|
8 % -> arrow(A:arglist(N),B:arglist(M),empty).
|
samer@0
|
9 %
|
samer@0
|
10 % The type empty denotes the type of empty arrays, ie
|
samer@0
|
11 % the state of an arr arrow is always an empty matrix.
|
samer@0
|
12
|
samer@0
|
13 function o=arrf(ffn,nin,nout,varargin)
|
samer@0
|
14 opts=prefs('sizefn',[],varargin{:});
|
samer@0
|
15 o=class(struct('fn',ffn,'sizefn',opts.sizefn),'arrf',arrow(nin,nout));
|
samer@0
|
16 end
|