Script Library: 1213 scripts
 

interweave.r

REBOL [ Title: "Interweave" Date: 18-Jul-2002 Name: 'Interweave Version: 1.0.1 File: %Interweave.r Purpose: {Combines two series into one series by interleaving their values.} eMail: %Al--Bri--xtra--co--nz Web: http://valley.150m.com Example: [ Interweave [1 2 3] [#"A" #"B" #"C"] Interweave "ABCDE" "12345" ] library: [ level: 'beginner platform: none type: 'tool domain: 'DB tested-under: none support: none license: none see-also: none ] ] Interweave: function [ {Combines two series into one series by interleaving their values.} Series1 [series!] Series2 [series!] ] [Interweaved Length] [ Interweaved: make type? Series1 Length: length? Series1 repeat Index Length [ repend Interweaved [ Series1/:Index Series2/:Index ] ] Interweaved ]
halt ;; to terminate script if DO'ne from webpage
Notes
  • email address(es) have been munged to protect them from spam harvesters. If you are a Library member, you can log on and view this script without the munging.
  • (Al:Bri:xtra:co:nz)