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

[REBOL] Re: "piping" functions

From: compkarori:gmai:l at: 23-Nov-2005 2:12

butfirst: func [ series ][ copy next ] is shorter .. so short, one wonders if it needs to be a function :) On 11/23/05, Jean-Francois Allie <jf_allie-hotmail.com> wrote:
> > 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? > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- Graham Chiu