fun f (x) { case x of `a -> write (1) | `b -> write (2) | `c -> write (3) | _ -> write (4) esac } x := read (); f (`a); f (`b); f (`c); f (`d)