dummy-link

ReusableFunctions

Automated storage and retrieval of results for functions calls

Readme

ReusableFunctions

Automated storage and retrieval of results for Julia functions calls. ReusableFunctions is a module of MADS.

Installation

import Pkg; Pkg.add("ReusableFunctions")

Example

import ReusableFunctions
function f(x)
    @info("function f is executed!")
    sleep(1)
    return x
end
f_reuse = ReusableFunctions.maker3function(f);

julia> f(1) # normal function call
[ Info: function f is executed!
1

# function call using ReusableFunctions function
# the first time f_reuse() is called the original function f() is called
julia> f_reuse(1)
[ Info: function f is executed!
1

# function call using ReusableFunctions function
# the second time f_reuse() is called he original function f() is NOT called
# the already stored output from the first call is reported
julia> f_reuse(1)
1

Documentation

ReusableFunctions functions are documented at https://madsjulia.github.io/Mads.jl/Modules/ReusableFunctions

Projects using ReusableFunctions

Publications, Presentations, Projects

First Commit

01/26/2016

Last Touched

6 days ago

Commits

99 commits

Used By: