Skip to content

Commit

Permalink
Update utils/tamedevil/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie authored Apr 26, 2024
1 parent 66b92e2 commit fd3b208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/tamedevil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ If `obj` is potentially expensive code and you need to reference it multiple
times (e.g. `` te`(${obj}.foo === 3 ? ${obj}.bar : ${obj}.baz)` ``) then you can
use `tmp` to create a temporary variable that stores reference to it and return
the result of calling `callback` passing this temporary reference. E.g.
`` te.tmp(obj, tmp => te`(${tmp}.foo === 3 ? ${tmp}.bar : ${tmp}.baz)`) `` means
``te.tmp(obj, tmp => te`(${tmp}.foo === 3 ? ${tmp}.bar : ${tmp}.baz)`)`` means
that the potentially expensive expression in the original `obj` variable only
need to be evaluated once, not 3 times.

Expand Down

0 comments on commit fd3b208

Please sign in to comment.