Hi Ladislav,

You can mutate the various paths:

>> b: [some/sort/of/path]
== [some/sort/of/path]
>> change first b 'no
== sort/of/path
>> b
== [no/sort/of/path]
>> insert tail first b 12
==
>> b
== [no/sort/of/path/12]
>> b: ['some/sort/of/lit-path]
== ['some/sort/of/lit-path]
>> change first b 'no
== 'sort/of/lit-path
>> b
== ['no/sort/of/lit-path]
>> b: [some/sort/of/get-path:]
== [some/sort/of/get-path:]
>> change first b 'no
== sort/of/get-path:
>> b
== [no/sort/of/get-path:]

And you can change actions, ops and natives in a limited way:

>> source action?
action?: native ["Returns TRUE for action values." value [any-type!] 6]
>> third :action?
== ["Returns TRUE for action values." value [any-type!] 6]
>> change third :action? "Returns YES for action values."
== [value [any-type!] 6]
>> source action?
action?: native ["Returns YES for action values." value [any-type!] 6]

>> change third :+ "Returns the result of summing two values."
== [
    value1 [char! number! money! date! time! tuple!]
    value2 [char! number! money! date! time! tuple!]
]
>> source +
+: native ["Returns the result of summing two values."
    value1 [char! number! money! date! time! tuple!]
    value2 [char! number! money! date! time! tuple!]
]

>> change third :print "Displays a value on the console and starts a new line."
== [
    value "The value to print"
]
>> source print
print: native [{Displays a value on the console and starts a new line.}
    value "The value to print"
]


Cheers,
Eric

Reply via email to