I'm working on nodejs' command line and intend to import a script named "code-chapter-5.js" as it works in python:
import * from code-chapter-5.js
Searched through and got a solution as:
.load ./code-chapter-5.js
It works:
> pair(1,3)
[ 1, 3 ]
> is_pair(pair(1, 3))
true
but report error:
Thrown:
ReferenceError: apply_in_underlying_javascript is not defined
at arg_list (repl:48:142)
at perform_make_operation_exp (repl:485:2557)
at perform_make_test (repl:351:2085)
at execute (repl:165:1035)
at message.start (repl:171:1148)
at start (repl:191:1306)
Since the referenced question was answered 6 years ago How do I load my script into the node.js REPL?
What's the decent solution now?