Skip to content

Commit 7632b8b

Browse files
committed
FEAT: Make map datatype composable in closures
related to: Oldes/Rebol-issues#2685
1 parent 631ad38 commit 7632b8b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/core/c-frame.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@
10481048
REBINT *binds = WORDS_HEAD(Bind_Table);
10491049

10501050
for (; NOT_END(data); data++) {
1051-
if (ANY_BLOCK(data))
1051+
if (ANY_BLOCK_OR_MAP(data))
10521052
Rebind_Block(src_frame, dst_frame, VAL_BLK_DATA(data), modes);
10531053
else if (ANY_WORD(data) && VAL_WORD_FRAME(data) == src_frame) {
10541054
VAL_WORD_FRAME(data) = dst_frame;

src/tests/units/evaluation-test.r3

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ Rebol [
501501

502502
f2: closure/with [b][compose #[num: (a + b)]][a: 1]
503503
--assert #[num: 3] = try [f2 2]
504+
505+
--assert #[num: 4] = use[v][v: 4 compose #[num: (v)]]
506+
--assert #[num: 5] = apply func [val] [compose/deep #[num: (val)]] [5]
504507

505508
===end-group===
506509

0 commit comments

Comments
 (0)