library cachedrecursion
Easily make cached calls especially in slowly recursions in PHP.
xtlsoft/cachedrecursion
Easily make cached calls especially in slowly recursions in PHP.
- Saturday, December 23, 2017
- by xtlsoft
- Repository
- 1 Watchers
- 0 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
CachedRecursion
Easily make cached calls especially in slowly recursions in PHP., (*1)
Install
composer require xtlsoft/cachedrecursion, (*2)
Usage
<?php
use \CachedRecursion\Factory;
$func = Factory::cached(
[
"n"
],
function($param, $next, $solve){
if($param['n'] == 1) return $solve(1);
else return $solve($param['n'] * $next($param['n']-1));
}
);
echo $func(1);
Isn't it easy?, (*3)
dev-master
9999999-dev
Easily make cached calls especially in slowly recursions in PHP.
Sources
Download
MIT
The Requires
by
xtl