{Browse 3} {Show 3} {Browse true} {Browse fiddle} % {Browse Fiddle} declare X X=20 {Browse (X * X)} declare Y=25 {Show Y} % declare z % {Show z+3} declare Q Q=7 Q=Q+1 {Show Q} declare fun {Inc N} N+1 end {Browse {Inc 3}} % {Inc 4} % wrong! declare proc {Inc N R} R=N+1.0 end {Browse {Inc 7.3}} declare fun {Fact N} if N == 0 then 1 else N*{Fact N-1} end end {Browse '{Fact 3} is '#{Fact 3}} declare fun {Fib N} if N == 0 orelse N==1 then 1 else if 2 =< N then {Fib N-1}+{Fib N-2} end end end {Browse {Fib 3}} {Browse {Fib 4}} {Browse {Fib 5}} {Browse ~5} {Browse &c} % &\012 is a newline an_atom anotherOne ':=' {Browse 'if'} % {Browse if} div 'div' {Browse 'an_atom'} {Browse an_atom == 'an_atom'} declare I Y LT RT {Browse tree(key: I value:Y left:LT right:RT)} nil '|'(3 nil) 3|nil {Browse a|(b|(c|nil))} declare fun {ListLength Ls} case Ls of _|Tail then 1+{ListLength Tail} else 0 end end {Browse {ListLength a|b|c|nil}} declare A B C thread C = A+B {Browse C} end {Delay 4000} A=2 B=3 declare C = {NewCell 0} thread C := 1 end thread {Delay 20} C := 2 end {Delay 100} {Browse @C} declare Toggle = {NewCell true} Toggle := {Not @Toggle} {Browse @Toggle} declare local V in V = {NewCell true} fun {Flip} V := {Not @V} @V end fun {Value} @V end end {Browse {Value}} {Browse {Flip}} {Browse {Value}} % {Browse V} -- V is hidden by the local