testing
+31 −6 · 5 files changed
-
demo/counter.ur+12 −2 -
demo/hello.ur+8 −2 -
demo/hello.urs+1 −0 -
demo/link.ur+5 −2 -
demo/rec.ur+5 −0
@@ -4,5 +4,15 @@ fun counter n = return <xml><body> <a link={counter (n + 1)}>Increment</a><br/> <a link={counter (n - 1)}>Decrement</a> </body></xml> - -fun main () = counter 0 +(* +fun square x = return <xml><body> + Current value: {[x]}<br/> + <a link={square (x * x)}>Square</a><br/> +</body></xml> + *) +fun acounter z = return <xml><body> + Current acounter: {[z]}<br/> + <a link={acounter (z + 1)}>Increment</a><br/> + <a link={acounter (z - 1)}>Decrement</a> +</body></xml> +fun main () = counter (0) acounter (200) @@ -1,9 +1,15 @@ + +fun tomain () = return <xml><body> + Another function + </body></xml> fun main () = return <xml> <head> <title>Hello world!</title> </head> - <body> - <h1>Hello world!</h1> + <h1>This is a test page!</h1> + <h2>This is a header 2 font</h2> + <h3>This is a header 3 font</h3> + <a link={tomain ()}>Click</a> </body> </xml> @@ -1 +1,2 @@ val main : unit -> transaction page +val tomain : unit -> transaction page @@ -1,7 +1,10 @@ fun target () = return <xml><body> Welcome! </body></xml> - +fun target2 () = return <xml><body> + Another target + </body></xml> fun main () = return <xml><body> - <a link={target ()}>Go there</a> + <p><a link={target ()}>Go there</a></p> + <a link={target2 ()}>Go here</a> </body></xml> @@ -1,7 +1,12 @@ fun main () = return <xml><body> <a link={other ()}>Go to the other one!</a> + <a link={others ()}>Go to the others page!</a> </body></xml> and other () = return <xml><body> <a link={main ()}>Return to <tt>main</tt>!</a> </body></xml> + +and others () = return <xml><body> + <a link={other ()}>Return to <tt>other</tt></a> + </body></xml>