summaryrefslogtreecommitdiff
path: root/tensors.mac
diff options
context:
space:
mode:
Diffstat (limited to 'tensors.mac')
-rw-r--r--tensors.mac2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensors.mac b/tensors.mac
index 6e9cf8d..2249b0d 100644
--- a/tensors.mac
+++ b/tensors.mac
@@ -22,3 +22,5 @@ box_op(func) := (
- contr(ug[μ,ν] * mcs[μ,ν,ρ] * cdiff(func, ρ), [μ,ν,ρ])))$
mappend(f, list) := apply(append, map(f, list));
+
+ensure_list(x) := if listp(x) then x else [x];