adam@1848: fun isBeppo (s : string) : transaction string =
adam@1848: case s of
adam@1848: "Beppo" => return "Yup, that's him!"
adam@1848: | "Mephisto" => error Great googely moogely!
adam@1848: | _ => return "Who's that?"
adam@1848:
adam@1848: fun listOf (n : int) =
adam@1848: if n < 0 then
adam@1848: error Negative!
adam@1848: else if n = 0 then
adam@1848: return []
adam@1848: else
adam@1848: ls <- listOf (n - 1);
adam@1848: return (n :: ls)
adam@1848:
adam@1848: fun length ls =
adam@1848: case ls of
adam@1848: [] => 0
adam@1848: | _ :: ls' => 1 + length ls'
adam@1848:
adam@1848: fun main () : transaction page =
adam@1848: s <- source "";
adam@1848: ns <- source "";
adam@1848: return
adam@1848:
adam@1848: