Factor out generate-head

This commit is contained in:
Nathan McCarty 2025-02-07 02:26:17 -05:00
parent 9a87e7825a
commit 68e20af5d7
3 changed files with 67 additions and 44 deletions

18
lib/Render/Util.rakumod Normal file
View file

@ -0,0 +1,18 @@
use v6.e.PREVIEW;
unit module Render::Util;
sub opt($test, $item) is export {
if $test {
$item
} else {
[]
}
}
sub optl($test, &item) is export {
if $test {
item
} else {
[]
}
}