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

[REBOL] Re: Displaying AM / PM times

From: al:bri:xtra at: 31-Aug-2001 17:19

>> Line7: "7:14 7:17 7:23 7:26 7:32 7:40 7:43 7:47 7:54 8:03 8:08 8:16 8:26"
== {7:14 7:17 7:23 7:26 7:32 7:40 7:43 7:47 7:54 8:03 8:08 8:16 8:26}
>> d7: load line7
== [7:14 7:17 7:23 7:26 7:32 7:40 7:43 7:47 7:54 8:03 8:08 8:16 8:26 ]
>> map d7 :ntime
== ["7:14 AM" "7:17 AM" "7:23 AM" "7:26 AM" "7:32 AM" "7:40 AM" "7:43 AM" 7:47 AM "7:54 AM" "8:03 AM" "8:08 AM" "8:16 AM" "8 :26 A...
>> source map
map: func [ {Maps or applies the function to all elements of the series.} Arg1 [any-function! series!] Arg2 [any-function! series!] /Only "Inserts the result of the function as a series." /local Result Results Function Series][ any [ all [ any-function? :Arg1 series? :Arg2 (Function: :Arg1 Series: :Arg2 true) ] all [ any-function? :Arg2 series? :Arg1 (Function: :Arg2 Series: :Arg1 true) ] throw make error! reduce [ 'script 'cannot-use rejoin [ {"} mold 'Map " " mold type? :Arg1 {"} ] rejoin [ {"} mold type? :Arg2 {"} ] ] ] Results: make Series length? Series do reduce [ 'foreach Arguments :Function 'Series compose [ if not unset? set/any 'Result Function (Arguments :Function) [ either only [ insert/only tail Results :Result ] [ insert tail Results :Result ] ] ] ] Results ] I hope that helps! Andrew Martin ICQ: 26227169 http://zen.scripterz.org