Skip to content

Commit 98326f3

Browse files
committed
fix Returns
1 parent 85c00e5 commit 98326f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/MeasureBase.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ function logdensity end
3636

3737

3838
if VERSION < v"1.7.0-beta1.0"
39-
@eval Returns(x) = _ -> x
39+
@eval begin
40+
struct Returns{T}
41+
value::T
42+
end
43+
44+
(f::Returns)(x) = f.value
45+
end
4046
end
4147

4248
include("combinators/half.jl")

0 commit comments

Comments
 (0)