Skip to content

Commit 0f7931b

Browse files
committed
Add docs of JS Math
1 parent 9069a62 commit 0f7931b

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

LANGUAGE.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ Multiple conditional evaluation
8989
(booleanExpressionN resultExpresionN)
9090
)
9191
```
92-
Mathematical functions
92+
## Mathematical functions
9393

94-
Arithmetical
94+
### Arithmetical
9595

9696
With N-arguments
9797
```lisp
@@ -109,7 +109,7 @@ Substraction: `-`
109109
Product: `*`
110110
Division: `/`, `exp1 / (exp2 * exp3 * ... * expN)`
111111

112-
Logical
112+
### Logical
113113

114114
Greater: `>`, BINARY
115115
Greater or Equal`>=`, BINARY
@@ -125,19 +125,25 @@ Strings
125125

126126
Concatenation: `cat`
127127

128-
JavaScript related functions
128+
## JavaScript related functions
129129

130-
JS Math
130+
### JS Math
131131

132132
Math object: `Math`
133+
```lisp
134+
(Math x a1 a2 ... an) // Math[x](a1, a2, ..., an)
135+
(Math .log a1 a2 ... an) // Math.log(a1, a2, ..., an)
136+
```
137+
138+
## Data Structures (abstractions)
133139

134140
Key-Value structure:
135141
```lisp
136142
(kv
137-
key1NameOrExp value1Expression
138-
key2NameOrExp value2Expression
139-
...
140-
keyNNameOrExp valueNExpression
143+
key1NameOrExp value1Expression
144+
key2NameOrExp value2Expression
145+
...
146+
keyNNameOrExp valueNExpression
141147
)
142148
```
143149

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lisp-js-compiler",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "JavaScript compiler / interpreter for Lisp language",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)