Advertisement
Guest User

Untitled

a guest
Aug 4th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfscript>
  2.  
  3. times = 0;
  4.  
  5. function recurse( source ) {
  6.  
  7.     out = [source];
  8.    
  9.     if(times > 0) {
  10.         times--;
  11.         arrayAppend(out, recurse(out));
  12.     }
  13.    
  14.    
  15.     return out;
  16. };
  17.  
  18. source = [1];
  19. start = getTickCount();
  20. result = recurse(source);
  21. end = getTickCount();
  22.  
  23. </cfscript>
  24.  
  25. <cfdump var="#result#" />
  26. <cfdump var="#end-start# ms" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement