function o=buffer(source,n,m,varargin)
% BUFFER - Buffer abstract data object
%
% buffer :: (source:data, frame:natural, overlap:natural)->data
% Works exactly like the usual buffer function but when applied
% to a data object, returns a fndata object.

args=[{n,m} varargin];
o=fndata(@(z)buf(args,z),source,'charfn',@(o)charfn(n,n-m,o));

function x=buf(args,y)
	x=buffer(y,args{:});

function s=charfn(n,m,o)
	s=sprintf('%s >> buffer(%d/%d)',tostring(source(o)),n,m);
