variable: display: WIP

This commit is contained in:
Jan Nieuwenhuizen 2019-11-16 23:02:33 +01:00 committed by Jan (janneke) Nieuwenhuizen
parent f7ffa7cfeb
commit 4f70be1c32
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 5 additions and 2 deletions

View File

@ -125,7 +125,10 @@
(display ">" port))
((variable? x)
(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))
((number? x)
(display (number->string x) port))

View File

@ -39,7 +39,7 @@ struct scm *
car_ (struct scm *x)
{
struct scm *a = x->car;
if (x->type == TPAIR)
if (x->type == TPAIR || x->type == TCLOSURE || x->type == TVARIABLE)
return a;
return make_number (cast_scmp_to_long (a));
}