(:has) - Operators
select a value that contains another
clojure
(:has val)Where:
- val: what must be inside this value *
Examples
Find log calls happening inside any arm of a match statement.
clojure
(match-arm _ (:has (call log::debug!)))Selects in lines { 5 } but not in { 12 }:
rust
fn main(args: Vec<String>) {
for arg in args {
match arg.as_str() {
"--help" => {
log::debug!("is asking for help")
}
_ => {}
};
}
log::debug!("done")
}Arguments
val
Does NOT support: Refinement — Replacement