core: Fix displaying of closure.

* src/lib.c (display_helper): Fix displaying of closure.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-20 20:01:45 +02:00
parent 24748f575a
commit cee0972566
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,12 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p)
else if (t == TCLOSURE)
{
fdputs ("#<closure ", fd);
display_helper (CDR (x), cont, "", fd, 0);
SCM circ = CADR (x);
SCM name = CADR (circ);
SCM args = CAR (CDDR (x));
display_helper (CAR (name), 0, "", fd, 0);
fdputc (' ', fd);
display_helper (args, 0, "", fd, 0);
fdputs (">", fd);
}
else if (t == TFUNCTION)