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

[REBOL] Re: "piping" functions

From: jf_allie::hotmail::com at: 23-Nov-2005 22:28

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]