2017 © Pedro Peláez
 

library cachedrecursion

Easily make cached calls especially in slowly recursions in PHP.

image

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

The README.md

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)

The Versions

23/12 2017

dev-master

9999999-dev

Easily make cached calls especially in slowly recursions in PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by xtl