From 597507f3b85b570dfb6dc4ecfd06d14f9d237c96 Mon Sep 17 00:00:00 2001 From: paulklint Date: Wed, 20 Mar 2024 12:33:57 +0100 Subject: [PATCH] Fixed error intercalateAnd and intercalateOr. --- src/analysis/typepal/Messenger.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analysis/typepal/Messenger.rsc b/src/analysis/typepal/Messenger.rsc index a0be35f..d32fed4 100644 --- a/src/analysis/typepal/Messenger.rsc +++ b/src/analysis/typepal/Messenger.rsc @@ -40,7 +40,7 @@ str intercalateAnd(list[str] strs){ case 1: return strs[0]; default: { dist = distribution(strs); - newstrs = [(dist[key] > 1 ? " x " : "") + "``" | key <- strs]; + newstrs = [(dist[key] > 1 ? " x " : "") + "``" | key <- dist]; return intercalate(", ", newstrs[0..-1]) + " and " + newstrs[-1]; } }; @@ -53,7 +53,7 @@ str intercalateOr(list[str] strs){ case 2: return strs[0] == strs[1] ? strs[0] : " or "; default: { dist = distribution(strs); - newstrs = [(dist[key] > 1 ? " x " : "") + key | key <- strs]; + newstrs = [(dist[key] > 1 ? " x " : "") + key | key <- dist]; return intercalate(", ", newstrs[0..-1]) + " or " + newstrs[-1]; } };