バブルソート(笑)

by 12346
whileでループwwwwwww
笑っておけばソートされるんじゃないですか?w
♥7 | Line 18 | Modified 2012-02-10 23:54:25 | MIT License
play

ActionScript3 source code

/**
 * Copyright 12346 ( http://wonderfl.net/user/12346 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/psM1
 */

package{public class sort extends Example{public function sort(){
    $=function(...a){trace(a)};
    
    A=[3,5,6,4,1,7,2];
    n=A.length;
  
    trace(A);
    trace("\n---sort start---");
  
    while()()()()()()();
    
    trace("---sort end---\n");
    trace(A);
    
}}import com.actionscriptbible.Example}

var $:Function;
var A:Array,n:int,a:int,b:int,i:int=-1,j:int=-1,f:Function,:Function=K;
function F():Function{return =a<b?f:}
function G():Function{a=i;b=--j;f=H;=I;return F;}
function H():Function{a=A[j];b=A[j-1];f=J;=K;return F;}
function I():Function{a=i++;b=j=n;f=K;=null;return F;}
function J():Function{a=A[j];A[j]=A[j-1];A[j-1]=a;$(A);return G;}
function K():Function{return G;}

Forked