text: caterwaul.tconfiguration('std','seq.core',function (){this.shallow('seq',{core:fn_[null]/se[_.prototype=[]/se.p[p.constructor=_]]})}).tconfiguration('std','seq.finite.core',function (){let[push=Array.prototype.push,slice=Array.prototype.slice][this.configure('seq.core').seq.finite=fc[xs][this.length=0,push.apply(this,slice.call(xs||[]))]/se.c[c.prototype=new this.seq.core()/se[_.size()=this.length,_.constructor=c]]]}).tconfiguration('std','seq.finite.serialization',function (){this.configure('seq.finite.core').seq.finite.prototype.toString()='seq[#{Array.prototype.slice.call(this).join(", ")}]'}).tconfiguration('std','seq.finite.mutability',function (){let[push=Array.prototype.push,slice=Array.prototype.slice] in this.configure('seq.finite.core').seq.finite.prototype/se[_.push()=(push.apply(this,arguments),this),_.pop()=this[--this.length]/se[(function (){delete this[this.length]}).call(this)],_.concat(xs)=new this.constructor(this)/se[_.push.apply(_,slice.call(xs))]]}).tconfiguration('std','seq.finite.object',function (){let[own=Object.prototype.hasOwnProperty] in this.configure('seq.finite.core').seq.finite/se[_.keys(o,all)=new _()/se[(function (){for (var k in o)if (all||own.call(o,k))_.push(k)})()],_.values(o,all)=new _()/se[(function (){for (var k in o)if (all||own.call(o,k))_.push(o[k])})()],_.pairs(o,all)=new _()/se[(function (){for (var k in o)if (all||own.call(o,k))_.push([k,o[k]])})()],_.prototype.object(o)=(o||{})/se[this.each(fn[p][_[p[0]]=p[1]])]]}).tconfiguration('std opt','seq.finite.traversal',function (){this.configure('seq.finite.core seq.finite.mutability').seq.finite.prototype/se[_.map(f)=new this.constructor()/se[opt.unroll[i,this.length][_.push(f.call(this,this[i],i))]],_.filter(f)=new this.constructor()/se[opt.unroll[i,this.length][_.push(this[i]),when[f.call(this,this[i],i)]]],_.each(f)=this/se[opt.unroll[i,_.length][f.call(_,_[i],i)]],_.reversed()=new this.constructor()/se[let[l=this.length] in opt.unroll[i,this.length][_.push(this[l-i-1])]],_.foldl(f,x)=let[x=arguments.length>1?x:this[0],xi=2-arguments.length][opt.unroll[i,this.length-xi][x=f.call(this,x,this[i+xi],i+xi)],x,when[this.length>=xi]],_.foldr(f,x)=let[x=arguments.length>1?x:this[this.length-1],xi=3-arguments.length,l=this.length][opt.unroll[i,l-(xi-1)][x=f.call(this,this[l-(i+xi)],x,l-(i+xi))],x,when[l>=xi-1]]]}).tconfiguration('std opt','seq.finite.zip',function (){this.configure('seq.finite.traversal').seq.finite/se[let[seq=_,slice=Array.prototype.slice][_.prototype.zip()=let[as=new seq([this].concat(slice.call(arguments))),options={f:fn_[new seq(arguments)],outer:false}][caterwaul.util.merge(options,as.pop()),when[as[as.length-1].constructor===Object],let[l=as.map(fn[x][x.length]).foldl(options.outer?fn[x,y][Math.max(x,y)]:fn[x,y][Math.min(x,y)]),f=options.f] in new this.constructor()/se[opt.unroll[i,l][_.push(f.apply({i:i},as.map(fn[x][x[i]]).slice()))]]]]]}).tconfiguration('std opt continuation','seq.finite.quantification',function (){this.configure('seq.finite.core').seq.finite.prototype/se[_.exists(f)=call/cc[fb[cc][opt.unroll[i,this.length][f.call(this,this[i],i)&&cc(this[i]||true)],false]],_.forall(f)=!this.exists(fn_[!f.apply(this,arguments)])]}).tconfiguration('std','seq.infinite.core',function (){this.configure('seq.core').seq.infinite=fn_[null]/se[_.prototype=new this.seq.core()/se[_.constructor=ctor],where[ctor=_]]/se[_.def(name,ctor,h,t)=i[name]=ctor/se[_.prototype=new i()/se[_.h=h,_.t=t,_.constructor=ctor]],where[i=_],_.def('cons',fn[h,t][this._h=h,this._t=t],fn_[this._h],fn_[this._t]),_.def('k',fn[x][this._x=x],fn_[this._x],fn_[this])]}).tconfiguration('std','seq.infinite.y',function (){this.configure('seq.infinite.core').seq.infinite.def('y',fc[f,x][this._f=f,this._x=x],fn_[this._x],fn_[new this.constructor(this._f,this._f(this._x))])}).tconfiguration('std continuation','seq.infinite.transform',function (){this.configure('seq.infinite.core').seq.infinite/se[_.prototype.map(f)=new _.map(f,this),_.def('map',fc[f,xs][this._f=f,this._xs=xs],fn_[this._f(this._xs.h())],fn_[new this.constructor(this._f,this._xs.t())]),_.prototype.filter(f)=new _.filter(f,this),_.def('filter',fc[f,xs][this._f=f,this._xs=let*[next(s)(cc)=f(s.h())?cc(s):call/tail[next(s.t())(cc)]] in call/cc[next(xs)]],fn_[this._xs.h()],fn_[new this.constructor(this._f,this._xs.t())])]}).tconfiguration('std continuation','seq.infinite.traversal',function (){let[finite=this.configure('seq.finite.core seq.finite.mutability').seq.finite] in this.configure('seq.infinite.core').seq.infinite.prototype/se[_.drop(f)=let*[next(s)(cc)=f(s.h())?call/tail[next(s.t())(cc)]:cc(s)] in call/cc[next(this)],_.take(f)=let*[xs=new finite(),next(s)(cc)=let[h=s.h()][f(h)?(xs.push(h),call/tail[next(s.t())(cc)]):cc(xs)]] in call/cc[next(this)]]}).tconfiguration('std opt continuation','seq.dsl',function (){this.configure('seq.core seq.infinite.y seq.finite.core seq.finite.zip seq.finite.traversal seq.finite.mutability').seq.dsl={}/se[_.define_pattern(pattern,expansion)=_/se[ps.push([pattern,expansion])],_.prefix_substitute(tree,prefix)=tree.rmap(fn[n][new n.constructor('#{prefix}#{n.data.substring(1)}'),when[n.data.charAt(0)==='_']]),_.define_functional(op,expansion,xs)=trees_for(op).map(fn[t,i][_.define_pattern(t,fn[l,v,r][expansion.replace({x:_.expand(l),y:i<4?qs[fn[xs][y]].replace({xs:_.prefix_substitute(xs,i&1?v.data:'_'),y:(i&2?_.expand:fn[x][x])(r||v)}):v})])]),_.define_functional/se[_('%',qs[x.filter(y)],qs[_,_i]),_('*',qs[x.map(y)],qs[_,_i]),_('/',qs[x.foldl(y)],qs[_,_0,_i]),_('%!',qs[x.filter(c(y))].replace({c:not}),qs[_,_i]),_('*!',qs[x.each(y)],qs[_,_i]),_('/!',qs[x.foldr(y)],qs[_,_0,_i]),_('&',qs[x.forall(y)],qs[_,_i]),_('|',qs[x.exists(y)],qs[_,_i]),_('>>',qs[x.drop(y)],qs[_]),_('<<',qs[x.take(y)],qs[_]),_('>>>',qs[new r(y,x)].replace({r:new this.ref(this.seq.infinite.y)}),qs[_])],seq(qw('> < >= <= == !=')).each(fn[op][_.define_pattern(qs[_+_].clone()/se[_.data=op],rxy(qs[x.length+y.length].clone()/se[_.data=op]))]),let[e(x)=_.expand(x)] in _.define_pattern/se[_(qs[_&&_],rxy(qs[qg[x&&x.length?y:x]])),_(qs[_===_],rxy(qs[qg[x===y||x.length===y.length&&x.zip(y).forall(fn[p][p[0]===p[1]])]])),_(qs[_||_],rxy(qs[qg[x&&x.length?x:y]])),_(qs[_!==_],rxy(qs[qg[x!==y&&(x.length!==y.length||x.zip(y).exists(fn[p][p[0]!==p[1]]))]])),_(qs[_^_],rxy(qs[x.zip(y)])),_(qs[_+_],rxy(qs[x.concat(y)])),_(qs[!_],rxy(qs[x.object()])),_(qs[_,_],rxy(qs[x,y])),_(qs[~_],rxy(qs[new r(x)].as('(').replace({r:new this.ref(this.seq.finite)}))),_(qs[_?_:_],fn[x,y,z][qs[x?y:z].replace({x:e(x),y:e(y),z:e(z)})]),let[rx(t)(x,y)=t.replace({x:e(x),y:y})][_(qs[_(_)],rx(qs[x(y)])),_(qs[_[_]],rx(qs[x[y]])),_(qs[_._],rx(qs[x.y])),_(qs[_].as('('),rx(qs[qg[x]]))],_(qs[+_],fn[x][x]),seq(qw('sk sv sp')).zip(qw('keys values pairs')).each(fb[p][_(qs[p[_]].replace({p:p[0]}),rxy(qs[r(x)].replace({r:new this.ref(this.seq.finite[p[1]])})))])],_.expand(t)=call/cc[fn[cc][opt.unroll[i,ps.length][let*[p=ps[ps.length-(i+1)],m=t.match(p[0])][cc(p[1].apply(t,m)),when[m]]],t]],this.rmacro(qs[seq[_]],fn[x][_.expand(x)]),where*[template(op)(t)=qs[_+x].replace({x:t})/se[_.data=op],qw=caterwaul.util.qw,not=new this.ref(fn[f][fn_[!f.apply(this,arguments)]]),trees_for(op)=op.charAt(op.length-1)==='!'?seq([qs[![_]],qs[!_[_]],qs[!~[_]],qs[!~_[_]],qs[!+_]]).map(template(op.substring(0,op.length-1))):seq([qs[[_]],qs[_[_]],qs[~[_]],qs[~_[_]],qs[+_]]).map(template(op)),rxy(tree)(x,y)=tree.replace({x:_.expand(x),y:y&&_.expand(y)}),seq=fb[xs][new this.seq.finite(xs)],ps=_.patterns=new this.seq.finite()]]}).configuration('seq',function (){this.configure('seq.core seq.finite.core seq.finite.object seq.finite.mutability seq.finite.traversal seq.finite.zip seq.finite.quantification '+'seq.finite.serialization seq.infinite.core seq.infinite.y seq.infinite.transform seq.infinite.traversal seq.dsl')});