Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by raluk

8 hours ago

Having lexicial scope it is same as -> defer fn{if(some condition) x() }() within scope.

1 comment

raluk

Reply

tgv  4 hours ago

Except 'some condition' may change, can be long, or expensive, so you likely need an extra variable.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities