Skip to content

Instantly share code, notes, and snippets.

View thewebartisan7's full-sized avatar

Damir thewebartisan7

  • Localhost
View GitHub Profile
@thewebartisan7
thewebartisan7 / recursion.js
Created October 1, 2021 06:15 — forked from bendc/recursion.js
Functional loop
const loop = (() => {
const recur = (callback, count, i=0) => {
if (i == count-1) return callback(i);
callback(i);
return recur(callback, count, i+1);
};
return (callback, count) => {
if (count > 0) return recur(callback, count);
};
})();
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Tightenco\Ziggy\Ziggy;
class GenerateRoutesCommand extends Command
{