validate_atom_state function

dynamic validate_atom_state(
  1. dynamic validator$1,
  2. dynamic new_state$1
)

Implementation

dc.dynamic validate_atom_state(dc.dynamic validator$1, dc.dynamic new_state$1, ){
late final dc.dynamic $if_$1;
if((validator$1 is dc.Function)){
$if_$1=(validator$1 as dc.Function)(new_state$1, );
}else if((validator$1 is lcoc_core.IFn$iface)){
$if_$1=((validator$1 as lcoc_core.IFn$iface).$_invoke$1(new_state$1, ));
}else{
$if_$1=(lcoc_core.IFn.extensions(validator$1, ).$_invoke$1(validator$1, new_state$1, ));
}
if((($if_$1!=false)&&($if_$1!=null))){
return null;
}
throw dc.Exception("Validator rejected reference state", );
}