On 30 December 2011 13:30, Ron de Bruijn <[email protected]> wrote:

> Via [naughtyDebug].

Indeed, here is a sample program for future generations. It outputs

Serving URI /favicon.ico....
Accepted connection.
Handling connection with thread #0.
Serving URI /Naughty/main....
OK 4 is an even number
Hey 3 is an odd number

[gergoe@homeship sandbox]$ cat naughty.ur
fun half ( n : int ) =
    let
        val foo = if ( n % 2 = 1 )
                     then naughtyDebug ("Hey " ^ show n ^ " is an odd number")
                     else naughtyDebug ("OK " ^ show n ^ " is an even number")
     in
        n / 2
    end

fun main () =
    return <xml>{[half 4]}{[half 3]}</xml>
[gergoe@homeship sandbox]$ cat naughty.urp
naughty
[gergoe@homeship sandbox]$ cat naughty.urs
val main : {} -> transaction page

- Gergely

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to