maybe_destructured function
dynamic
maybe_destructured(
- dynamic params$1,
- dynamic body$1
Implementation
dc.dynamic maybe_destructured(dc.dynamic params$1, dc.dynamic body$1, ){
if(lcoc_core.every$QMARK_(lcoc_core.symbol$QMARK_, params$1, )){
return lcoc_core.cons(params$1, body$1, );
}
dc.dynamic params$2=params$1;
final dc.dynamic o7807$1=params$2;
late final dc.dynamic $if_$1;
if((o7807$1 is lcoc_core.IMeta$iface)){
$if_$1=((o7807$1 as lcoc_core.IMeta$iface).$_meta$0());
}else{
$if_$1=((lcoc_core.IMeta.extensions(o7807$1, ) as lcoc_core.IMeta$ext).$_meta$0(o7807$1, ));
}
dc.dynamic new_params$1=lcoc_core.with_meta(lcoc_core.$_EMPTY_VECTOR, $if_$1, );
dc.dynamic lets$1=lcoc_core.$_EMPTY_VECTOR;
do {
late final dc.bool $if_$2;
if(((params$2!=false)&&(params$2!=null))){
$if_$2=false;
}else{
$if_$2=true;
}
if($if_$2){
final dc.dynamic arg$1=(lcoc_core.list.$_invoke$1(new_params$1, ));
final dc.dynamic o7603$1=(lcoc_core.concat.$_invoke$3((lcoc_core.list.$_invoke$1((lcoc_core.symbol.$_invoke$2("cljd.core", "let", )), )), (lcoc_core.list.$_invoke$1(lets$1, )), body$1, ));
late final dc.dynamic $if_$3;
if((o7603$1 is lcoc_core.ISeqable$iface)){
$if_$3=((o7603$1 as lcoc_core.ISeqable$iface).$_seq$0());
}else{
$if_$3=((lcoc_core.ISeqable.extensions(o7603$1, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$1, ));
}
final dc.dynamic $1=(lcoc_core.list.$_invoke$1($if_$3, ));
final dc.dynamic o7603$2=(lcoc_core.concat.$_invoke$2(arg$1, $1, ));
if((o7603$2 is lcoc_core.ISeqable$iface)){
return ((o7603$2 as lcoc_core.ISeqable$iface).$_seq$0());
}
return ((lcoc_core.ISeqable.extensions(o7603$2, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$2, ));
}
late final dc.bool $if_$4;
if(lcoc_core.symbol$QMARK_(lcoc_core.first(params$2, ), )){
$if_$4=false;
}else{
$if_$4=true;
}
if($if_$4){
late final dc.dynamic gparam$1;
if((lcoc_core.gensym is dc.Function)){
gparam$1=(lcoc_core.gensym as dc.Function)("p__", );
}else if((lcoc_core.gensym is lcoc_core.IFn$iface)){
gparam$1=((lcoc_core.gensym as lcoc_core.IFn$iface).$_invoke$1("p__", ));
}else{
gparam$1=(lcoc_core.IFn.extensions(lcoc_core.gensym, ).$_invoke$1(lcoc_core.gensym, "p__", ));
}
final dc.dynamic params$2tmp=lcoc_core.next(params$2, );
final dc.dynamic coll7642$1=new_params$1;
final dc.dynamic o7643$1=gparam$1;
if((coll7642$1 is lcoc_core.ICollection$iface)){
new_params$1=((coll7642$1 as lcoc_core.ICollection$iface).$_conj$1(o7643$1, ));
}else{
new_params$1=((lcoc_core.ICollection.extensions(coll7642$1, ) as lcoc_core.ICollection$ext).$_conj$1(coll7642$1, o7643$1, ));
}
final dc.dynamic coll7642$2=lets$1;
final dc.dynamic o7643$2=lcoc_core.first(params$2, );
late final dc.dynamic coll7642$3;
if((coll7642$2 is lcoc_core.ICollection$iface)){
coll7642$3=((coll7642$2 as lcoc_core.ICollection$iface).$_conj$1(o7643$2, ));
}else{
coll7642$3=((lcoc_core.ICollection.extensions(coll7642$2, ) as lcoc_core.ICollection$ext).$_conj$1(coll7642$2, o7643$2, ));
}
final dc.dynamic o7643$3=gparam$1;
if((coll7642$3 is lcoc_core.ICollection$iface)){
lets$1=((coll7642$3 as lcoc_core.ICollection$iface).$_conj$1(o7643$3, ));
}else{
lets$1=((lcoc_core.ICollection.extensions(coll7642$3, ) as lcoc_core.ICollection$ext).$_conj$1(coll7642$3, o7643$3, ));
}
params$2=params$2tmp;
continue;
}
if((lcoc_core.name(lcoc_core.first(params$2, ), ).startsWith(".", ))){
final dc.dynamic o7603$3=(lcoc_core.concat.$_invoke$1((lcoc_core.concat.$_invoke$2(new_params$1, params$2, )), ));
late final dc.dynamic $if_$5;
if((o7603$3 is lcoc_core.ISeqable$iface)){
$if_$5=((o7603$3 as lcoc_core.ISeqable$iface).$_seq$0());
}else{
$if_$5=((lcoc_core.ISeqable.extensions(o7603$3, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$3, ));
}
final dc.dynamic $2=(lcoc_core.apply.$_invoke$2(lcoc_core.vector, $if_$5, ));
final dc.dynamic $4=(lcoc_core.list.$_invoke$1($2, ));
final dc.dynamic o7603$4=(lcoc_core.concat.$_invoke$3((lcoc_core.list.$_invoke$1((lcoc_core.symbol.$_invoke$2("cljd.core", "let", )), )), (lcoc_core.list.$_invoke$1(lets$1, )), body$1, ));
late final dc.dynamic $if_$6;
if((o7603$4 is lcoc_core.ISeqable$iface)){
$if_$6=((o7603$4 as lcoc_core.ISeqable$iface).$_seq$0());
}else{
$if_$6=((lcoc_core.ISeqable.extensions(o7603$4, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$4, ));
}
final dc.dynamic $3=(lcoc_core.list.$_invoke$1($if_$6, ));
final dc.dynamic o7603$5=(lcoc_core.concat.$_invoke$2($4, $3, ));
if((o7603$5 is lcoc_core.ISeqable$iface)){
return ((o7603$5 as lcoc_core.ISeqable$iface).$_seq$0());
}
return ((lcoc_core.ISeqable.extensions(o7603$5, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$5, ));
}
final dc.dynamic params$2tmp=lcoc_core.next(params$2, );
final dc.dynamic coll7642$4=new_params$1;
final dc.dynamic o7643$4=lcoc_core.first(params$2, );
if((coll7642$4 is lcoc_core.ICollection$iface)){
new_params$1=((coll7642$4 as lcoc_core.ICollection$iface).$_conj$1(o7643$4, ));
}else{
new_params$1=((lcoc_core.ICollection.extensions(coll7642$4, ) as lcoc_core.ICollection$ext).$_conj$1(coll7642$4, o7643$4, ));
}
params$2=params$2tmp;
continue;
} while(true);
}