by nmadden · 2y ago · 0 comments
some_func $value[set value “”]
where the [set value “”] bit reduces the refcount. There’s also a fairly widespread idiom of using the K combinator for this[1]: some_func [K $value [set value “”]]
It’s one of those things that has become second-nature to people in-the-know, but is a total headscratcher otherwise.[1]: https://wiki.tcl-lang.org/page/K#c2a6014c2d129837889d8a8000d...
No comments yet.