-
Hi all, Is there a DSL way to run something like the code below?
Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@aborruso DSL expressions don't call verbs per se -- however, under the hood a verb is a command-line wrapper around some code in a subroutine. That same code can have a second, DSL wrapper around it and, voilà, a function which is callable from the DSL. Already-existing examples include So, we could do something similar here. However, the For your use-case, which is |
Beta Was this translation helpful? Give feedback.
@aborruso DSL expressions don't call verbs per se -- however, under the hood a verb is a command-line wrapper around some code in a subroutine. That same code can have a second, DSL wrapper around it and, voilà, a function which is callable from the DSL.
Already-existing examples include
seg2gmt
which is a verb and a function; likewise the verbclean-whitespace
and the functionclean_whitespace
.So, we could do something similar here.
However, the
fill-down
verb is a bit trickier since it retains state from the previous record -- making it not a function solely of the current record.For your use-case, which is
fill-down
over all fields -- maybe we could instead simply augment the existing…