Skip to content

Commit

Permalink
Fixed error intercalateAnd and intercalateOr.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Mar 20, 2024
1 parent c6a4500 commit 597507f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/typepal/Messenger.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ str intercalateAnd(list[str] strs){
case 1: return strs[0];
default: {
dist = distribution(strs);
newstrs = [(dist[key] > 1 ? "<dist[key]> x " : "") + "`<key>`" | key <- strs];
newstrs = [(dist[key] > 1 ? "<dist[key]> x " : "") + "`<key>`" | key <- dist];
return intercalate(", ", newstrs[0..-1]) + " and " + newstrs[-1];
}
};
Expand All @@ -53,7 +53,7 @@ str intercalateOr(list[str] strs){
case 2: return strs[0] == strs[1] ? strs[0] : "<strs[0]> or <strs[1]>";
default: {
dist = distribution(strs);
newstrs = [(dist[key] > 1 ? "<dist[key]> x " : "") + key | key <- strs];
newstrs = [(dist[key] > 1 ? "<dist[key]> x " : "") + key | key <- dist];
return intercalate(", ", newstrs[0..-1]) + " or " + newstrs[-1];
}
};
Expand Down

0 comments on commit 597507f

Please sign in to comment.