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

[REBOL] To-pair vs as-pair

From: reboler::ifrance::com at: 1-Jan-2003 17:16

Hi list, Reading the new document about the Draw dialect, I found a new function 'as-pair. May be not so new for some of you, but in case... Compared to 'to-pair, 'as-pair seems much easier to work with: ; direct value
>> as-pair 2 5
== 2x5 ; variables
>> x: 3
== 3
>> as-pair x x * 2
== 3x6
>> as-pair x 2 * x
== 3x6
>> to-pair 2 5
== 5
>> to-pair [2 5]
== 2x5
>> to-pair reduce [x x * 2]
== 3x6 Regards Patrick _____________________________________________________________________ GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321 (prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné. Règlement : http://www.ifrance.com/_reloc/sign.sms