.net编译器是否知道从以下代码生成尾递归?(意思是它知道不应该进行回溯,因为&&?)
public bool DeleteLocation(Guid locationId)
{
return ((_mLocationDal.Save(locationRes) != null) &&
locationRes.ChildrenIds.Aggregate(true,
(succeededSoFar, next) => succeededSoFar &&
DeleteLocation(next)));
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
110 次 |
| 最近记录: |