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

[REBOL] Did you know? - 'Bind is stackable!

From: al:bri:xtra at: 4-Oct-2000 18:29

Did you know? - 'Bind is stackable! I didn't - until I tried it. Have a look at the line: if all bind bind Filter 'File 'Header Unit: function ['Name [word!] Base-Directory [file!] Sub-Directory [file!] Filter [block!]] [Script Header] [ error? try [ if system/script/parent/header/File = %user.r [ set Name make object! [ Directory: file! Files: block! ] change-dir Base-Directory Name: get Name Name/Directory: Sub-Directory Name/Files: read Name/Directory change-dir Name/Directory foreach File Name/Files [ Script: load/header File Header: first Script if all bind bind Filter 'File 'Header [ do Script ] ] Name/Directory: join Base-Directory Sub-Directory ] ] ] Unit Patches %/C/Rebol/Patch/ %Patches/ [ Header/File = File Header/Patch = Header/Name ] Unit Enhancements %/C/Rebol/Enhancement/ %Enhancements/ [ Header/File = File Header/Enhancement = Header/Name ] BTW, 'Unit is my keystone building block for Patches, Enhancements for Rebol and Components and Plug-ins for Rebol applications, like RebMail. Note that the order of 'File and 'Header didn't matter. Which leads me to wonder if an enhanced version of 'bind that allows a block would be of interest to people or Rebol crew. Andrew Martin ICQ: 26227169