variable: display: WIP
This commit is contained in:
parent
a285782399
commit
03502d7844
|
@ -125,7 +125,10 @@
|
||||||
(display ">" port))
|
(display ">" port))
|
||||||
((variable? x)
|
((variable? x)
|
||||||
(display "#<variable " port)
|
(display "#<variable " port)
|
||||||
(write (list->string (car (core:car x))) port)
|
(if (pair? (core:car x)) (display (car (core:car x)) port)
|
||||||
|
(begin
|
||||||
|
(display "value: " port)
|
||||||
|
(display (core:car x) port)))
|
||||||
(display ">" port))
|
(display ">" port))
|
||||||
((number? x)
|
((number? x)
|
||||||
(display (number->string x) port))
|
(display (number->string x) port))
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct scm *
|
||||||
car_ (struct scm *x)
|
car_ (struct scm *x)
|
||||||
{
|
{
|
||||||
struct scm *a = x->car;
|
struct scm *a = x->car;
|
||||||
if (x->type == TPAIR)
|
if (x->type == TPAIR || x->type == TCLOSURE || x->type == TVARIABLE)
|
||||||
return a;
|
return a;
|
||||||
return make_number (cast_scmp_to_long (a));
|
return make_number (cast_scmp_to_long (a));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue