Skip to content

Commit

Permalink
publish TryProduction.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Jan 5, 2025
1 parent 1f9d758 commit ae2ea82
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,19 @@ <h2>Sequences</h2>
</dl>
</section>

<section>
<h2>Interactive</h2>
<dl>
<dt><a href="https://webengineering-fhnw.github.io/Kolibri/production/TryProduction.html">Kolibri Bundle</a></dt>
<dd>You can try the Kolibri
<a href="https://raw.githubusercontent.com/WebEngineering-FHNW/Kolibri/gh-pages/productionBundle.js">production
bundle</a> on a dedicated
<a href="https://webengineering-fhnw.github.io/Kolibri/production/TryProduction.html">bundle page</a>.
Open the page and use the console of your browser's developer tools as a REPL to play with the Kolibri!
</dd>
</dl>
</section>

<section>
<h2>Logging</h2>
<dl>
Expand Down Expand Up @@ -252,6 +265,5 @@ <h2>Styling</h2>
</section>

</main>

</body>
</html>
28 changes: 28 additions & 0 deletions docs/production/TryProduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,41 @@ <h1>Try Kolibri Production Bundle</h1>
fib = memoize(fib);

out.textContent = `
The 44th Fibonacci number is:
${ asCH( fib(44) ) }
built with Kolibri ${versionInfo}
`;

</script>

<pre>
You can use your browser's console to try Kolibri for yourself.
Here are some ideas of what you can do:

let fibo = n => n < 2 ? 1 : fibo(n - 1) + fibo(n - 2);
fibo = memoize(fibo);
fibo(44);

10..times ( console.log );
10..times ( n => n**3 ).sum();

[1,2,3].eq([1,2,3]);

Walk(3) ['=='] ( Seq(0,1,2,3) );

let pyth = from( Walk(2, ALL))
.and( z => Walk(2, z) )
.and( ( [ z, y ] ) => Walk(2, y) )
.where ( ([[ z, y ], x]) => x*x + y*y === z*z )
.select ( ([[ z, y ], x]) => ` ${x} ${y} ${z}` )
.result();
pyth.show();
pyth.drop(100).take(5).show();


</pre>

</body>


Expand Down

0 comments on commit ae2ea82

Please sign in to comment.