Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: "piping" functions

From: compkarori:gma:il at: 24-Nov-2005 2:35

back tail series returns the series one back from the end so, you should be looking for butlast: func [series][ copy/part series index? back tail series ] On 11/24/05, Jean-Francois Allie <jf_allie-hotmail.com> wrote:
> > Thanks Graham, it is very short indeed! > > butfirst: func [series][ > copy next series > ] > > Your version made me realise I had misinterpreted the effect of the "index" > functions like "back" and "next". You see I thought they returned the index > position, when in fact, they return the whole series but only show its > valuesstarting at the position of the index. I think a sliding window would > be a better metaphor then the arrow pointing at the position. > > Unfortunately, this "sliding window" model breaks down in the following > function where "back tail series" seems to return an index. But when you > check the type of "back tail series" it answers "block". > > Is it a case where we will need both the wave and the particule models to > understand the phenomenon? What's going on? > > many thanks > > butlast: func [series][ > copy/part series back tail series > ] > > >>num: [1 2 3 4] > > == [1 2 3 4] > > >>butlast num > > == [1 2 3] > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- Graham Chiu