modern.compiler: fix map-literals
parent
26f74e9d83
commit
2e89f86d16
|
@ -102,19 +102,18 @@ VARIABLE-ARITY: \<FUNCTOR: 2
|
||||||
drop f
|
drop f
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
|
DEFER: map-literals
|
||||||
: (map-literals) ( obj quot: ( obj -- obj' ) -- seq )
|
: (map-literals) ( obj quot: ( obj -- obj' ) -- seq )
|
||||||
over matched-literal? [
|
over [ array? ] any? [
|
||||||
[ call drop ] [
|
[ call drop ] [
|
||||||
'[
|
map-literals
|
||||||
first3 [ [ _ (map-literals) ] map ] dip 3array
|
|
||||||
] call
|
|
||||||
] 2bi
|
] 2bi
|
||||||
] [
|
] [
|
||||||
call
|
over array? [ map-literals ] [ call ] if
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
||||||
: map-literals ( obj quot: ( obj -- obj' ) -- seq )
|
: map-literals ( obj quot: ( obj -- obj' ) -- seq )
|
||||||
'[ _ (map-literals) ] map ; inline
|
'[ _ (map-literals) ] map ; inline recursive
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue