local memoize = require 'memoize'
local function f(...) return end
local F = memoize(f)
-- nil cannot be used as an argument if any non-nil arguments follow it
F(true, nil) -- runs, but cache is not correctly stored to or accessed
F(nil, nil) -- runs, but cache is not correctly stored to or accessed
F(nil, true) -- throws an error: table index is nil
To avoid this from happening, some extra logic would have to be run when a function parameter is nil.