You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
USAGE:
EXTEND obj word val
DESCRIPTION:
Extend an object, map, or block type with word and value pair.
EXTEND is a function! value.
ARGUMENTS:
obj [object! map! block! paren!] Object to extend (modified).
word [any-word!]
val [any-type!]
While in Red language it is:
USAGE:
EXTEND obj spec
DESCRIPTION:
Extend an object or map value with list of key and value pairs.
EXTEND is a native! value.
ARGUMENTS:
obj [object! map!]
spec [block! hash! map!]
REFINEMENTS:
/case => Use case-sensitive comparison.
And in Red it is possible to use it for example to merge two maps like:
>> extend #[a:1b:2] #[b:3a:1c:4]
==#[
a:1b:3c:4
]
I believe that being able to extend a value using a single pair of key and value like it is in Rebol now is also useful, but the key could be defined by refinement so default behaviour would be like in Red. The missing case-sensitivity is also an issue in Rebol!
The text was updated successfully, but these errors were encountered:
Current
extend
function is defined as:While in Red language it is:
And in Red it is possible to use it for example to merge two maps like:
I believe that being able to extend a value using a single pair of key and value like it is in Rebol now is also useful, but the key could be defined by refinement so default behaviour would be like in Red. The missing case-sensitivity is also an issue in Rebol!
The text was updated successfully, but these errors were encountered: