[REBOL] Re: "piping" functions
From: jf_allie:hotmai:l at: 23-Nov-2005 1:02
Thanks Volker,
It's proof I can't see straight anymore and that I should go home.
Seems to work now.
butlast: func [series] [
copy/part series (length? series) - 1]
butfirst: func [series] [
copy/part next series (length? series) - 1]
>>num: [1 2 3 4]
== [1 2 3 4]
>>butlast num
== [1 2 3]
>> butfirst num
== [2 3 4]
>>butfirst butlast num
== [2 3]
>> butlast butfirst num
== [2 3]
By the way, are there more Rebolish, efficient or elegant way's to do it?