update_vals function
dynamic
update_vals(
- dynamic m$1,
- dynamic f$1
Implementation
dc.dynamic update_vals(dc.dynamic m$1, dc.dynamic f$1, ){
late final dc.dynamic $if_$2;
if(((lcoc_core.IEditableCollection.satisfies(m$1, )) as dc.bool)){
$if_$2=lcoc_core.transient(m$1, );
}else{
$if_$2=lcoc_core.transient(lcoc_core.$_EMPTY_MAP, );
}
final dc.dynamic $1=lcoc_core.reduce_kv((dc.dynamic acc$1, dc.dynamic k$1, dc.dynamic v$1, ){
late final dc.dynamic $if_$1;
if((f$1 is dc.Function)){
$if_$1=(f$1 as dc.Function)(v$1, );
}else if((f$1 is lcoc_core.IFn$iface)){
$if_$1=((f$1 as lcoc_core.IFn$iface).$_invoke$1(v$1, ));
}else{
$if_$1=(lcoc_core.IFn.extensions(f$1, ).$_invoke$1(f$1, v$1, ));
}
return (lcoc_core.assoc$BANG_.$_invoke$3(acc$1, k$1, $if_$1, ));
}, $if_$2, m$1, );
final dc.dynamic $2=lcoc_core.persistent$BANG_($1, );
final dc.dynamic o7807$1=m$1;
late final dc.dynamic $if_$3;
if((o7807$1 is lcoc_core.IMeta$iface)){
$if_$3=((o7807$1 as lcoc_core.IMeta$iface).$_meta$0());
}else{
$if_$3=((lcoc_core.IMeta.extensions(o7807$1, ) as lcoc_core.IMeta$ext).$_meta$0(o7807$1, ));
}
return lcoc_core.with_meta($2, $if_$3, );
}