Skip to content

Commit cc3af46

Browse files
committed
Added prefix and @prefix to docs
1 parent 9e0730f commit cc3af46

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/src/api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ One can nest models and call another model inside the model function with [`@sub
2121
@returned_quantities
2222
```
2323

24+
In the context of nesting models, it's also useful to prefix the variables in sub-models to avoid variable names clashing:
25+
26+
```@docs
27+
prefix(::DynamicPPL.Model, x)
28+
@prefix
29+
```
30+
2431
### Type
2532

2633
A [`Model`](@ref) can be created by calling the model function, as defined by [`@model`](@ref).

0 commit comments

Comments
 (0)