ayvango
ayvango

Reputation: 5977

How to force lazy value computation

What is the idiomatic scala way to force computation on lazy value?

Upvotes: 9

Views: 3128

Answers (1)

om-nom-nom
om-nom-nom

Reputation: 62835

Just call it:

lazy val x = someOperation()
// ...
x

Upvotes: 16

Related Questions