[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14482: Macro not able to see a function
From: |
Sanel Zukan |
Subject: |
bug#14482: Macro not able to see a function |
Date: |
Mon, 27 May 2013 12:51:42 +0200 |
Hi,
Here is example code:
---------------------------------------
(define (partition-two lst)
(if (< (length lst) 2)
'()
(cons
(list (car lst) (cadr lst))
(partition-two (cddr lst)))))
(define-macro (letn bindings . body)
`(let* ,(partition-two bindings)
,@body))
(define (println v)
(display v)
(newline))
(println
(letn (a 3
b 4
c 4
d a
f (+ a b))
(+ a b c d f)))
---------------------------------------
It correctly prints result, but I'm getting also:
---------------------------------------
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/sanel/letn.ss
;;; WARNING: compilation of /home/sanel/letn.ss failed:
;;; ERROR: Unbound variable: partition-two
21
---------------------------------------
I'm using guile: 2.1.0.180-9b977-dirty
Best.
- bug#14482: Macro not able to see a function,
Sanel Zukan <=