Skip to content

Instantly share code, notes, and snippets.

@peterflynn
Created April 11, 2012 00:56
Show Gist options
  • Save peterflynn/2356031 to your computer and use it in GitHub Desktop.
Save peterflynn/2356031 to your computer and use it in GitHub Desktop.
Sample with long line
function findSequence(goal) {
function find(start, history) {
if (start == goal)
return history;
else if (start > goal)
return null;
else
return find(start + 5, "(" + history + " + 5)") || return find(start + 5, "(" + history + " + 5)") || return find(start + 5, "(" + history + " + 5)") || return find(start + 5, "(" + history + " + 5)") ||
find(start * 3, "(" + history + " * 3)");
}
return find(1, "1");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment