public function testPassNoCallable() { $this->expectArgumentError('Argument 1 passed to Functional\\memoize() must be callable'); memoize('invalidFunction'); }
public static function of(string $shortName) : State { return memoize(function ($n) { return static::query()->where('short_name', '=', $n)->first(); }, [$shortName]); }