ReaJ / Reactive JavaScript

てすと

ページを開いてから sec 秒経過

ページを開いてから <b><R>sec</R></b> 秒経過

sec * sec = sec * sec

<R>sec</R> * <R>sec</R> = <R>sec * sec</R>

fib(sec%10) = fib(sec%10)

<script type="text/reaj">
var fib = function(x) { return x<=1 ? 1 : fib(x-1) + fib(x-2); };
</script>

<p>fib(sec%10) = <R>fib(sec%10)</R></p>

フィボナッチ 5 とみせかけて 10 ... var x = 5; var y = fib(x); x = 10; y

フィボナッチ 5 とみせかけて 10 ... <R>
   var x = 5;
   var y = fib(x);
   x = 10;
   y
</R>。

てすとてすと

var repeat = function(n,e) { return n ? repeat(n-1, e)+[e] : []; }; "g"+repeat( 20-Math.abs(20-Math.floor(msec/100)%40), "o" )+"gle"

<R>
var repeat = function(n,e) { return n ? repeat(n-1, e)+[e] : []; };

"g"+repeat( 20-Math.abs(20-Math.floor(msec/100)%40), "o" )+"gle"
</R>

elem(mouseX < mouseY ? "strong" : "em", "ねずみ@" + mouseX + "," + mouseY)

<R>elem(mouseX &lt; mouseY ? "strong" : "em", "ねずみ@" + mouseX + "," + mouseY)</R>