Hello list,
`thunk?' returns #t for procedures which are not thunks. Consider:
guile> (thunk? identity)
#t
guile> (define (f x) x)
guile> (thunk? f)
#t
Looking at the implementation of `thunk?' (procs.c:238), I see:
switch (SCM_TYP7 (obj))
{
case scm_tcs_closures:
if (SCM_NULLP (SCM_CAR (SCM_CODE (obj))))
return SCM_BOOL_T;
case scm_tc7_subr_0:
case scm_tc7_subr_1o:
case scm_tc7_lsubr:
case scm_tc7_rpsubr:
case scm_tc7_asubr:
#ifdef CCLO
case scm_tc7_cclo:
#endif
return SCM_BOOL_T;
Isn't there a `break' or `return' or something missing after the first
case? I'm not sure about the correct fix, because I don't understand
all the procedure types in Guile yet.
Regards,
'martin
_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile