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

[REBOL] Re: elegant idiom anyone?

From: carl:cybercraft at: 13-Feb-2008 6:16

On Wednesday, 13-February-2008 at 14:54:29 Anton Rolls wrote,
>Hi Kai, > >Kai Peters wrote: >> >> Who has an elegant way to >> convert >> >> b: [ "1" "2" "3" ] >> >> to >> >> b: [ 1 2 3 ] >> >> >> TIA, >> Kai > >We've been over this before, I'm sure, but anyway: > > >> to-block form b >== [1 2 3] > >> forall b [change b to-integer first b] >== [] > >> b >== [1 2 3]
Is there any reason you need the forall? ...
>> b: to-block form [ "1" "2" "3" ]
== [1 2 3]
>> type? b/1
== integer! ? -- Carl Read.