function o=extractdata(source,dim,range)
% extractdata - Sequence of extracts from source sequence
%
% extractdata :: seq [[Size]], D:natural, [[2]->[Size(D)]] -> seq [[Size2]].
%
% extractdata is basically the same as fndata extract but more efficient.

	sz=size(source); 
	sz(dim)=range(2)-range(1)+1;
	o.dim=dim;
	o.range=range;
	o=class(o,'extractdata',ddata(source,sz,'datafn',@dfn,'stringfn',@sfn,'nextfn',@next_c));


function x=dfn(o), x=extract(source(o),o.dim,o.range);
function s=sfn(o)
	s=sprintf('[%d/%d:%d]', o.dim, o.range(1), o.range(2));
