diff options
Diffstat (limited to 'src/sexp/util.rs')
-rw-r--r-- | src/sexp/util.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sexp/util.rs b/src/sexp/util.rs index c31358f..ce6de5d 100644 --- a/src/sexp/util.rs +++ b/src/sexp/util.rs @@ -25,3 +25,8 @@ impl From<i32> for SLeaf { pub fn scons(x: impl Into<Box<SExp>>, y: impl Into<Box<SExp>>) -> SExp { SCons(x.into(), y.into()) } + +pub fn var(name: &str) -> SExp { + Atom(Var(name.to_string())) +} + |