This came up before and @vlaviron said that it depends on whether the local function takes arguments from its context (a closure). So writing the local function as though it was external should avoid additional allocation.
geoffder
8
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Points-free style considered harmful? | 11 | 1556 | October 11, 2022 | |
| Terminate a line with ; or ;; or in or nothing | 28 | 4120 | December 14, 2021 | |
| Has "let" syntax changed recently? And why are the REPL and compiler behaving differently? | 17 | 678 | March 19, 2025 | |
| Why is declaring two variables with the sequence operator ; illegal? | 29 | 6095 | October 14, 2019 | |
| Simplifying function using Currying? | 4 | 1066 | May 5, 2020 |