Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function recur(data) {
- data = data+1;
- var nothing = function() {
- recur(data);
- }
- nothing();
- }
- (function(data){
- data = data+1;
- var nothing = function() {
- //Something here that calls the function?
- }
- nothing();
- })();
- (function foo() { foo(); })();
- asyncThingWithCallback(params, (function() {
- function recursive() {
- if (timeToStop())
- return whatever();
- recursive(moreWork);
- }
- return recursive;
- })());
- (function foo(data){
- data++;
- var nothing = function() {
- foo(data);
- }
- nothing();
- })();
- var Y = function (gen) {
- return (function(f) {
- return f(f);
- }(function(f) {
- return gen(function() {
- return f(f).apply(null, arguments);
- });
- }));
- }
- (Y(function(recur) {
- return function(data) {
- data = data+1;
- var nothing = function() {
- recur(data);
- }
- nothing();
- }
- })());
- (function(data){
- var recursive = arguments.callee;
- data = data+1;
- var nothing = function() {
- recursive(data)
- }
- nothing();
- })();
- (foo = function() { foo(); })()
- (recur = function(data){
- data = data+1;
- var nothing = function() {
- if (data > 100) return; // put recursion limit
- recur(data);
- }
- nothing();
- })(/* put data init value here */ 0);
- ({
- do: function() {
- console.log("don't run this ...");
- this.do();
- }
- }).do();
- (function () {
- // Pass
- }());
- (function foo () {
- foo();
- }());
- foo //-> undefined
- var initialValue = ...
- (function recurse(data){
- data++;
- var nothing = function() {
- recurse(data);
- }
- if ( ... stop condition ... )
- { ... display result, etc. ... }
- else
- nothing();
- }(initialValue));
- var functionCaller = function(thisCaller, data) {
- data = data + 1;
- var nothing = function() {
- thisCaller(thisCaller, data);
- };
- nothing();
- };
- functionCaller(functionCaller, data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement