Skip to content

Commit

Permalink
0.25.0-pre3
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Jul 27, 2024
1 parent 8d11f4a commit 0642070
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions _includes/grol_wasm.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,22 @@

<div>
<label for="input">Edit the sample/Enter your GROL code here:</label>
<textarea id="input" rows="12" cols="80">
<textarea id="input" rows="15" cols="80">
print("Outputting a smiley: 😀\n")
// function example:
// function example (will get reformatted when clicking run):
fact=func(n) {
// log output
log("called fact ", n)
if (n<=1) {
// log output
log("called fact ", n)
if (n<=1) {
return 1
}
// recursion
n*fact(n-1)
}
// recursion
n*fact(n-1)
}
// heterogeneous array
a=[fact(5), "abc", 76-3]
// maps also can have any key,value types
m={"str key": a, 42: "str val"}
</textarea>
m={"str key": a, 42: "str val"}</textarea>
</div>
<div>

Expand Down
Binary file modified grol.wasm
Binary file not shown.

0 comments on commit 0642070

Please sign in to comment.