Skip to content

Commit 8e00cc9

Browse files
committed
FEAT: allow definition of one function to multiple actions in scheme's actor dialect
1 parent fcdf59b commit 8e00cc9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/mezz/sys-ports.reb

+6-7
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,15 @@ make-scheme: func [
247247
if block? :def/actor [
248248
actor: make object! (length? :def/actor) / 4
249249
parse :def/actor [any [
250-
set name set-word! [
250+
copy name some set-word! [
251251
set func* any-function!
252-
(append actor reduce [name :func*])
253252
|
254-
'func set args block! set body block!
255-
(append actor reduce [name func args body])
253+
'func set args block! set body block! (func*: func args body)
256254
|
257-
'function set args block! set body block!
258-
(append actor reduce [name function args body])
259-
]
255+
'function set args block! set body block! (func*: function args body)
256+
] (
257+
forall name [append actor reduce [name/1 :func*]]
258+
)
260259
| end
261260
| pos: (
262261
cause-error 'script 'invalid-arg pos

0 commit comments

Comments
 (0)