![]()  | 
  
    Stan Math Library
    5.1.0
    
   Automatic Differentiation 
   | 
   
      
  | 
  inline | 
Creates a new vari with given value and a callback that implements the reverse pass (chain).
The callback needs to accept a referenct to the vari. If it needs any other data it should be implemented as a lambda capturing the variables it needs.
All captured values must be trivially destructible or they will leak memory! to_arena() function can be used to ensure that.
| T | type of value | 
| F | type of callable | 
| value | value of the vari | 
| functor | functor or other callable to call in the reverse pass | 
Definition at line 41 of file callback_vari.hpp.