Skip to content

Commit 4e0185e

Browse files
committed
[ readme ] Update README
1 parent b6251ff commit 4e0185e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ for a interpreted language.
2929

3030
See [FeatureTest](src/test/kotlin/org/lice/FeatureTest.kt) to learn more about the language's features.
3131

32+
Also, as the main repo for the Lice language, this repo will not be updated very frequently.
33+
Instead, I do language feature experiments in [The tiny version of Lice](https://github.com/lice-lang/lice-tiny), which is more actively updated and not guarenteed be backward capable.
34+
Once a feature is finished and tested, and not considered harmful, I'll copy the codes here and publish releases.
35+
3236
## It looks like
3337

3438
```lisp
@@ -120,7 +124,13 @@ Lice has handy APIs for interacting with Java.
120124
This project provides handy APIs for running Lice codes from Java.
121125

122126
```java
127+
// Running Lice
123128
System.out.println(Lice.run("(+ 1 1)")); // prints 2
124-
125129
System.out.println(Lice.run(new File("example.lice"))); // run codes in a file
130+
131+
// Lice API
132+
SymbolList env = new SymbolList();
133+
Lice.run("(def blablabla a (+ a a)) (-> myVar 233)", env);
134+
env.extractLiceFunction("blablabla").invoke(233); // result: 466
135+
int var = ((Number) env.extractLiceVariable("myVar")).intValue(); // result: 233
126136
```

0 commit comments

Comments
 (0)