Skip to content

Instantly share code, notes, and snippets.

View lynchs61's full-sized avatar

Sean Lynch lynchs61

  • Philadelphia, PA
View GitHub Profile
@lynchs61
lynchs61 / RecursivePromises.js
Last active November 30, 2017 18:05
This is an example of a promise chainthat repeatedly calls itself for onestep in the chain. Taken from https://www.bennadel.com/blog/3201-exploring-recursive-promises-in-javascript.htm.
Promise.resolve()
.then(
function() {
console.group( "Recursion - external function." );
return( 3 );
}
)
.then(
function( n ) {
// With the recursive function factored out into its own stand-alone
-------------------------------------------------------------------------------
>Log Session: Tuesday, February 12, 2013 8:29:36 PM EST
>System Info:
Product Version = Gephi 0.9-SNAPSHOT 201210100934
Operating System = Linux version 3.5.0-23-generic running on amd64
Java; VM; Vendor = 1.7.0_11; Java HotSpot(TM) 64-Bit Server VM 23.6-b04; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.7.0_11-b21
Java Home = /usr/lib/jvm/java-7-oracle/jre
System Locale; Encoding = en_US (gephi); UTF-8
Home Directory = /home/slynch