mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
make thunk? understand programs
* libguile/procs.c (thunk?): Return #t for thunk programs.
This commit is contained in:
parent
b95b1b835e
commit
7e58032880
1 changed files with 4 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "libguile/validate.h"
|
||||
#include "libguile/procs.h"
|
||||
#include "libguile/programs.h"
|
||||
|
||||
|
||||
|
||||
|
@ -218,7 +219,9 @@ SCM_DEFINE (scm_thunk_p, "thunk?", 1, 0, 0,
|
|||
obj = SCM_PROCEDURE (obj);
|
||||
goto again;
|
||||
default:
|
||||
;
|
||||
if (SCM_PROGRAM_P (obj) && SCM_PROGRAM_DATA (obj)->nargs == 0)
|
||||
return SCM_BOOL_T;
|
||||
/* otherwise fall through */
|
||||
}
|
||||
}
|
||||
return SCM_BOOL_F;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue