Last active
August 22, 2018 13:12
-
-
Save goto-bus-stop/a5d36e69c6d2db0679324911793ef92d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install babel-register | |
// node collect | less | |
const { spawn } = require('child_process') | |
const sp = spawn('node', ['--print-opt-source', 'fib.js'], {stdio: ['ignore', 'pipe', 'inherit']}) | |
sp.stdout.pipe(process.stdout) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fibonacci = (num) => { | |
if (num <= 1) return 1; | |
// do something that will add a bunch more functions to be optimized | |
require('path').join('/', 'a') | |
return fibonacci(num - 1) + fibonacci(num - 2); | |
} | |
console.log(fibonacci(40)) |
Author
goto-bus-stop
commented
Aug 22, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment