Display the new syntax in the README.md
This commit is contained in:
parent
2cdad77b0d
commit
eef984f5a9
1 changed files with 7 additions and 7 deletions
14
README.md
14
README.md
|
@ -7,8 +7,8 @@ Bolt
|
||||||
|
|
||||||
💬 Got some questions or feedback? Just open an issue and we'll be glad to respond!
|
💬 Got some questions or feedback? Just open an issue and we'll be glad to respond!
|
||||||
|
|
||||||
```ocaml
|
```rust
|
||||||
let fac = match.
|
fn fac = match.
|
||||||
0 | 1 => 1
|
0 | 1 => 1
|
||||||
k => k * fac (k-1)
|
k => k * fac (k-1)
|
||||||
```
|
```
|
||||||
|
@ -50,7 +50,7 @@ print f"Hey look! {spike.name} and {sadie.name} are playing together!"
|
||||||
Records are _extensible_, meaning that you can do things like this:
|
Records are _extensible_, meaning that you can do things like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
let greet { name, .. } = print f"Hello, {name}!"
|
fn greet { name, .. } = print f"Hello, {name}!"
|
||||||
|
|
||||||
greet sadie
|
greet sadie
|
||||||
greet spike
|
greet spike
|
||||||
|
@ -79,15 +79,15 @@ _Note that this example is very experimental._
|
||||||
```
|
```
|
||||||
import "html" ( Html )
|
import "html" ( Html )
|
||||||
|
|
||||||
let app : Html.
|
fn app : Html.
|
||||||
|
|
||||||
let user = perform get_state
|
let user = perform get_state
|
||||||
|
|
||||||
return match user.
|
return match user.
|
||||||
None => do
|
None => do
|
||||||
Future.when_done (fetch "/api/login") \data -> do
|
Future.when_done (fetch "/api/login") \data -> do
|
||||||
perform set_state data
|
perform set_state data
|
||||||
h1 [ "Please log in." ]
|
h1 [ "Please log in." ]
|
||||||
Some { name, .. } => h1 [ f"Welcome Back, {fullname}" ]
|
Some { name, .. } => h1 [ f"Welcome Back, {fullname}" ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue