print_map function
dynamic
print_map(
- dynamic m$1,
- dynamic sink$1
Implementation
dc.dynamic print_map(dc.dynamic m$1, dc.dynamic sink$1, ){
(sink$1 as dc.StringSink).write("{", );
if(((lcoc_core.IKVReduce.satisfies(m$1, )) as dc.bool)){
lcoc_core.reduce_kv((dc.dynamic need_sep$1, dc.dynamic k$1, dc.dynamic v$1, ){
if(((need_sep$1!=false)&&(need_sep$1!=null))){
(sink$1 as dc.StringSink).write(", ", );
}else{
}
final dc.dynamic o7570$1=k$1;
final dc.StringSink string_sink7571$1=(sink$1 as dc.StringSink);
if((o7570$1 is lcoc_core.IPrint$iface)){
(o7570$1 as lcoc_core.IPrint$iface).$_print$1(string_sink7571$1, );
}else{
(lcoc_core.IPrint.extensions(o7570$1, ) as lcoc_core.IPrint$ext).$_print$1(o7570$1, string_sink7571$1, );
}
(sink$1 as dc.StringSink).write(" ", );
final dc.dynamic o7570$2=v$1;
final dc.StringSink string_sink7571$2=(sink$1 as dc.StringSink);
if((o7570$2 is lcoc_core.IPrint$iface)){
(o7570$2 as lcoc_core.IPrint$iface).$_print$1(string_sink7571$2, );
}else{
(lcoc_core.IPrint.extensions(o7570$2, ) as lcoc_core.IPrint$ext).$_print$1(o7570$2, string_sink7571$2, );
}
return true;
}, false, m$1, );
}else{
final dc.dynamic coll7657$1=m$1;
dc.bool f7658$1(dc.dynamic need_sep$2, dc.dynamic p$8926_$1, ){
final dc.dynamic vec$8927_$1=p$8926_$1;
final dc.dynamic k$2=(lcoc_core.nth.$_invoke$3(vec$8927_$1, 0, null, ));
final dc.dynamic v$2=(lcoc_core.nth.$_invoke$3(vec$8927_$1, 1, null, ));
if(((need_sep$2!=false)&&(need_sep$2!=null))){
(sink$1 as dc.StringSink).write(", ", );
}else{
}
final dc.dynamic o7570$3=k$2;
final dc.StringSink string_sink7571$3=(sink$1 as dc.StringSink);
if((o7570$3 is lcoc_core.IPrint$iface)){
(o7570$3 as lcoc_core.IPrint$iface).$_print$1(string_sink7571$3, );
}else{
(lcoc_core.IPrint.extensions(o7570$3, ) as lcoc_core.IPrint$ext).$_print$1(o7570$3, string_sink7571$3, );
}
(sink$1 as dc.StringSink).write(" ", );
final dc.dynamic o7570$4=v$2;
final dc.StringSink string_sink7571$4=(sink$1 as dc.StringSink);
if((o7570$4 is lcoc_core.IPrint$iface)){
(o7570$4 as lcoc_core.IPrint$iface).$_print$1(string_sink7571$4, );
}else{
(lcoc_core.IPrint.extensions(o7570$4, ) as lcoc_core.IPrint$ext).$_print$1(o7570$4, string_sink7571$4, );
}
return true;
}
if((coll7657$1 is lcoc_core.IReduce$iface)){
(coll7657$1 as lcoc_core.IReduce$iface).$_reduce$2(f7658$1, false, );
}else{
(lcoc_core.IReduce.extensions(coll7657$1, ) as lcoc_core.IReduce$ext).$_reduce$2(coll7657$1, f7658$1, false, );
}
}
return ((sink$1 as dc.StringSink).write("}", ));
}