In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

バブルソート(笑)

whileでループwwwwwww
笑っておけばソートされるんじゃないですか?w
/**
 * 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;}