I have created a guile Scheme script using shebang notation.
Here is the code:
#!/usr/local/bin/guile \
-e main -s
!#
(define (fact-iter product counter max-count)
(if (> counter max-count)
product
(fact-iter (* counter product) (+ counter 1) max-count)))
(define (factorial n)
(fact-iter 1 1 n))
(define (main args)
(factorial args)
)
File Name: factScheme.guile
I tried running it directly in the terminal "factScheme.guile" and I got bash factScheme.guile: command not found
If I used "./factScheme.guile" and I got Permission Denied .
I would be obliged if anyone can tell me how to actually run a guile scheme script in the terminal of an ubuntu step-by-step.
I have guile in the directory mentioned in the code. I