3 ms·
Nimrod has strong metaprogramming capabilities. template htmlTag(tag: expr) {.immediate.} = proc tag(): string = "<" & astToStr(tag) & ">" h
by Cyther606 12y ago
Nimrod has strong metaprogramming capabilities.
template htmlTag(tag: expr) {.immediate.} =
proc tag(): string = "<" & astToStr(tag) & ">"
htmlTag(br)
htmlTag(html)
echo br()
produces:
<br>
http://nimrod-lang.org/talk01/slides.html http://nimrod-lang.org/talk01/slides.html
https://news.ycombinator.com/item?id=7071429 https://news.ycombinator.com/item?id=7071429