I am trying to use srfi-1 in guile. I used the following code to include the srfi:(use-modules (srfi srfi-1))
However, I get an error saying that srfi is probably undefined. How should I used srfi?
I tried googling this problem, but it seems that I am the first person with this problem.
(use-modules (srfi srfi-1))
is indeed the correct way to import SRFI 1, in top-level programs and in the REPL.
However, based on your previous question, I believe you may actually be writing a module instead, in which case the syntax is a little different. You'd use #:use-module (srfi srfi-1)
inside your define-module
. Example:
(define-module (my module)
#:use-module (srfi srfi-1)
;; rest of the module declaration here
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With