Reputation: 93
I want to load external rkt file in racket scheme from a parameter of a function. E.G.,
(define (test fileName)
(include fileName)
)
However, I am getting error indicating that fileName is not a pathname string, file' form, or
lib' form.
Is there a way to fix this or is there another better way to include a file from dynamic filename?
Upvotes: 3
Views: 469
Reputation: 5053
The best way to do this is to make the external file a module, and use dynamic-require
.
Upvotes: 3