% slices - sequence obtained from slices of an array
%
% slices :: 
%    [Size(1:E)->A]	~'E-dimensional array',
% -> seq([Size(1:E-1)->A]).
%
% slices :: 
%    [Size(1:E)->A]	~'E-dimensional array',
%    D:natural       ~'dimension of desired values'
% -> seq([arrset(Size,D,1)->A]).
%
% If 2nd parameter not given, the array is sliced along it's
% last non-singleton dimension. In the second form, arrset(Size1,D,1)
% is the same as Size except that element D is set to 1.

function y=slices(x,dim), 
	if nargin<2, dim=length(size1(x)); end
	if isempty(x), y=nil; else y=seq.slices(x,dim); end
end
