Am I right understanding that
def is evaluated every time it gets accessed
lazy val is evaluated once it gets acce
You are correct. For evidence from the specification:
From "3.3.1 Method Types" (for def):
Parameterless methods name expressions that are re-evaluated each time the parameterless method name is referenced.
From "4.1 Value Declarations and Definitions":
A value definition
val x : T = edefinesxas a name of the value that results from the evaluation ofe.A lazy value definition evaluates its right hand side
ethe first time the value is accessed.