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

[REBOL] Re: The map function

From: al:bri:xtra at: 8-Nov-2000 22:48

Sharriff wrote:
> According to the MAP help, it takes the types any-function block or block?
what am I doing wrong?
>> f: func [a] [join a " hello"] >> f 3
== "3 hello"
>> type? :f
== function!
>> type? f
** Script Error: f is missing its a argument. ** Where: type? f
>> map [1 2 3] :f
== ["1 hello" "2 hello" "3 hello"]
>> map :f ["Andrew says"]
== ["Andrew says hello"] Note the ":", colon or "snake-bite". Andrew Martin Swanning about... ICQ: 26227169 http://members.nbci.com/AndrewMartin/