select_keys function

dynamic select_keys(
  1. dynamic map$1,
  2. dynamic keyseq$1
)

Implementation

dc.dynamic select_keys(dc.dynamic map$1, dc.dynamic keyseq$1, ){
dc.dynamic ret$1=lcoc_core.$_EMPTY_MAP;
final dc.dynamic o7603$1=keyseq$1;
dc.dynamic keys$1;
if((o7603$1 is lcoc_core.ISeqable$iface)){
keys$1=((o7603$1 as lcoc_core.ISeqable$iface).$_seq$0());
}else{
keys$1=((lcoc_core.ISeqable.extensions(o7603$1, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$1, ));
}
do {
if(((keys$1!=false)&&(keys$1!=null))){
final dc.dynamic key$1=lcoc_core.first(keys$1, );
final dc.dynamic entry$1=(lcoc_core.$get_.$_invoke$3(map$1, key$1, lcoc_core.sentinel, ));
late final dc.bool $if_$1;
if(dc.identical(entry$1, lcoc_core.sentinel, )){
$if_$1=false;
}else{
$if_$1=true;
}
if($if_$1){
final dc.dynamic coll7725$1=ret$1;
final dc.dynamic k7726$1=key$1;
final dc.dynamic v7727$1=entry$1;
if((coll7725$1 is lcoc_core.IAssociative$iface)){
ret$1=((coll7725$1 as lcoc_core.IAssociative$iface).$_assoc$2(k7726$1, v7727$1, ));
}else{
ret$1=((lcoc_core.IAssociative.extensions(coll7725$1, ) as lcoc_core.IAssociative$ext).$_assoc$2(coll7725$1, k7726$1, v7727$1, ));
}
}else{
ret$1=ret$1;
}
keys$1=lcoc_core.next(keys$1, );
continue;
}
final dc.dynamic o7800$1=ret$1;
final dc.dynamic o7807$1=map$1;
late final dc.dynamic meta7801$1;
if((o7807$1 is lcoc_core.IMeta$iface)){
meta7801$1=((o7807$1 as lcoc_core.IMeta$iface).$_meta$0());
}else{
meta7801$1=((lcoc_core.IMeta.extensions(o7807$1, ) as lcoc_core.IMeta$ext).$_meta$0(o7807$1, ));
}
if((o7800$1 is lcoc_core.IWithMeta$iface)){
return ((o7800$1 as lcoc_core.IWithMeta$iface).$_with_meta$1(meta7801$1, ));
}
return ((lcoc_core.IWithMeta.extensions(o7800$1, ) as lcoc_core.IWithMeta$ext).$_with_meta$1(o7800$1, meta7801$1, ));
} while(true);
}