Skip to content

Commit e0adba7

Browse files
committed
Simplify logic (can rely on normalisation)
1 parent 049001e commit e0adba7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/AbstractPPLDistributionsExt.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ function AbstractPPL.hasvalue(
3232
# can return true.
3333
sz = size(dist)
3434
for idx in Iterators.product(map(Base.OneTo, sz)...)
35-
new_optic = if AbstractPPL.getoptic(vn) === identity
36-
Accessors.IndexLens(idx)
37-
else
38-
Accessors.IndexLens(idx) AbstractPPL.getoptic(vn)
39-
end
35+
new_optic = Accessors.IndexLens(idx) AbstractPPL.getoptic(vn)
4036
new_vn = VarName{sym}(new_optic)
4137
AbstractPPL.hasvalue(vals, new_vn) || return false
4238
end

0 commit comments

Comments
 (0)