%%% $Id: fibo.oz,v 1.0 2002/03/11 15:11:00 dada Exp $
%%% http://dada.perl.it/shootout/
functor
import System Application
define
fun {Fib N}
    case N
    of 0 then 1
    [] 1 then 1
    else {Fib N-2} + {Fib N-1} end
end
in 
    local A in
        [A] = {Application.getArgs plain}
        {System.printInfo {Fib {String.toInt A}}}
    end
    {Application.exit 0}
end