Last active
May 12, 2020 00:30
-
-
Save otherjoel/551636a8648d97aa7938a4a5603399b2 to your computer and use it in GitHub Desktop.
Pollen namespace reuse test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang pollen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang pollen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ raco pollen render another.txt example.txt | |
pollen: rendering another.txt example.txt | |
pollen: rendering /another.txt.pm | |
pollen: rendered /another.txt (421 ms) | |
pollen: rendering /example.txt.pm | |
pollen: rendered /example.txt (339 ms) | |
❯ cat another.txt | |
Result: 1 | |
(template) Result: 1 | |
❯ cat example.txt | |
Result: 2 | |
(template) Result: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(provide (all-defined-out)) | |
(define x 0) | |
(define (inc-x!) | |
(set! x (+ x 1))) | |
(define (xstr) | |
(format "Result: ~a" x)) | |
(define (root . elems) | |
(inc-x!) | |
`(root ,(xstr))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
◊(inc-x!) | |
◊(cadr doc) | |
(template) ◊(xstr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment