update readme
This commit is contained in:
parent
e6382965ef
commit
1a8bc0bc66
|
@ -10,6 +10,7 @@ Originally, Benz used to be the core component of [Picrin Scheme](https://github
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
|
#include "picrin/extra.h"
|
||||||
|
|
||||||
/* Simple REPL program */
|
/* Simple REPL program */
|
||||||
|
|
||||||
|
@ -26,11 +27,11 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
expr = pic_read(pic, pic_stdin(pic));
|
expr = pic_read(pic, pic_stdin(pic));
|
||||||
|
|
||||||
if (pic_eof_p(expr)) {
|
if (pic_eof_p(pic, expr)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pic_printf(pic, "~s\n", pic_eval(pic, expr, pic->lib));
|
pic_printf(pic, "~s\n", pic_eval(pic, expr, "picrin.user"));
|
||||||
}
|
}
|
||||||
|
|
||||||
pic_close(pic);
|
pic_close(pic);
|
||||||
|
@ -45,6 +46,7 @@ Function binding is also easy. `pic_defun` defines a scheme procedure converting
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
|
#include "picrin/extra.h"
|
||||||
|
|
||||||
int fact(int i) {
|
int fact(int i) {
|
||||||
return i == 1 ? 1 : i * fact(i - 1);
|
return i == 1 ? 1 : i * fact(i - 1);
|
||||||
|
|
Loading…
Reference in New Issue