- Posted by Michael Nelson <mike-nelson-ODAAT at WORLDNET.ATT.NET> May 17, 2000
- 2534 views
Just thought of this one:
function cut(sequence s,sequence index)
object x
x=s
for i=1 to length(x) do
if sequence(index[i]) then
x=x[index[i][1]..index[i][2]]
else
x=x[index[i]]
end if
end for
return x
end function
This expands on standard Euphoria by allowing slices in any dimension, not
just the last. Offhand, I don't know where I'd use this, but I'm sure
someone will find it useful.
-- Mike Nelson

