mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-20 06:09:17 +02:00
Allow procedure?
to work with procedures from interpreter.
This commit is contained in:
parent
af2c85b9a4
commit
772fcc24f9
1 changed files with 8 additions and 0 deletions
|
@ -739,6 +739,14 @@ object Cyc_is_procedure(object o) {
|
|||
tag == closureN_tag ||
|
||||
tag == primitive_tag) {
|
||||
return boolean_t;
|
||||
} else if (tag == cons_tag) {
|
||||
integer_type l = Cyc_length(o);
|
||||
if (l.value > 0 && Cyc_is_symbol(car(o)) == boolean_t) {
|
||||
if (strncmp(((symbol)car(o))->pname, "primitive", 10) == 0 ||
|
||||
strncmp(((symbol)car(o))->pname, "procedure", 10) == 0 ) {
|
||||
return boolean_t;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return boolean_f;
|
||||
|
|
Loading…
Add table
Reference in a new issue