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

[REBOL] prepend (was Re: Re: Reverse append refinement for write)

From: louisaturk:coxinet at: 15-Aug-2002 9:48

Here's a function based on Gregg's code. Do you see any way to improve it? rebol[] prepend: func [ { Inserts a value to the head of a file and returns the head. Usage: prepend file value-to-prepend } file [file!] value [any-type!] ][ close insert open file value ] prepend %pig.txt newline prepend %pig.txt " day!" prepend %pig.txt "Have a good" prepend %pig.txt reduce ["Another line." newline] prepend %pig.txt reduce [now newline] print read %pig.txt At 11:54 AM 8/15/2002 +0200, you wrote: