A small collection of WTF code snippets sorted by language.

  • vithigar@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    I think the explanation they provide is a bit lacking as well. Defining an anonymous function doesn’t “create a reference” to any variables it uses, it captures the scope in which it was defined and retains existing references.