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

[REBOL] Re: I hate computers!

From: g:santilli:tiscalinet:it at: 4-Jan-2003 19:58

Hi Joel, On Saturday, January 4, 2003, 6:20:39 PM, you wrote: JN> ====================================================================== JN> valid-type?: func [ JN> parameter [any-type!] JN> datatypes [series!] JN> ][ JN> parameter: type? parameter JN> foreach datatype reduce datatypes [ JN> if datatype = parameter [ JN> return true JN> ] JN> ] JN> ] JN> ====================================================================== And of course, one could also write: valid-type?: func [ parameter [any-type!] datatypes [block!] ; are you sure to want series! here? ] [ found? find reduce datatypes type? parameter ] Anyway, this function has the little problem of not working with pseudo-types. (Just warning you, maybe you don't need to use them.) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r