The implementation of equality checking in UNIQUE and other set operations looks like Cmp_Value, and the comparison method is to subtract pointers to object frames. If this subtraction is zero (for example, is this a SAME object?), Then the comparison is considered a match:
f-series.c Line 283, R3-Alpha Open Source Release
, Cmp_Block . Cmp_Block ... , , :
Cmp_Block() f-series.c
, , , UNIQUE , , EQUAL?... C.
, C, MAP-EACH UNIQUE. EQUAL? , ( , MAP-EACH , ):
my-unique: function [array [block!]] [
objs: copy []
map-each item unique array [
if object? :item [
foreach obj objs [
if equal? item obj [unset 'item break]
]
unless unset? :item [append objs item]
]
:item ;-- if unset, map-each adds nothing to result
]
]
, ! MAP! , , MAP! . , , , , .
(. Ren-C, Rebol , . chat)