#!/usr/bin/ruby

#
## The "Memoize" module from standard library
#

include Memoize;
import Memoize::memoize;

func fib(n) {
    n < 2 ? n : (fib(n-1) + fib(n-2));
}

memoize(fib);     # memoize the fib function

module Baz {
    say (31 |> main::fib)
    import main::fib
    say (32 |> fib)
}

say fib(33);
