From 51d5d8262b6cee0ddcb9c1a841497c873bae729f Mon Sep 17 00:00:00 2001 From: Nikita Levchuk Date: Fri, 26 Aug 2022 15:43:01 -0600 Subject: [PATCH 1/2] docs: use parentheses in sublist instructions example This task operates in terms of lists and thus, determining set of items as clojure list (not as vector) seems right --- exercises/practice/sublist/.docs/instructions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/practice/sublist/.docs/instructions.md b/exercises/practice/sublist/.docs/instructions.md index e8fde86f4..72a275f6b 100644 --- a/exercises/practice/sublist/.docs/instructions.md +++ b/exercises/practice/sublist/.docs/instructions.md @@ -18,9 +18,9 @@ The function `classify` should either return `:sublist`, `:superlist`, `:equal` ### Examples: - * A = [1, 2, 3], B = [1, 2, 3, 4, 5], A is a sublist of B - * A = [3, 4, 5], B = [1, 2, 3, 4, 5], A is a sublist of B - * A = [3, 4], B = [1, 2, 3, 4, 5], A is a sublist of B - * A = [1, 2, 3], B = [1, 2, 3], A is equal to B - * A = [1, 2, 3, 4, 5], B = [2, 3, 4], A is a superlist of B - * A = [1, 2, 4], B = [1, 2, 3, 4, 5], A is neither a superlist, sublist nor equal to B : they are unequal + * A = (1, 2, 3), B = (1, 2, 3, 4, 5), A is a sublist of B + * A = (3, 4, 5), B = (1, 2, 3, 4, 5), A is a sublist of B + * A = (3, 4), B = (1, 2, 3, 4, 5), A is a sublist of B + * A = (1, 2, 3), B = (1, 2, 3), A is equal to B + * A = (1, 2, 3, 4, 5), B = (2, 3, 4), A is a superlist of B + * A = (1, 2, 4), B = (1, 2, 3, 4, 5), A is neither a superlist, sublist nor equal to B : they are unequal From 53ac018a95e138343313eabb9f9b1a6d5c7572ee Mon Sep 17 00:00:00 2001 From: Bobbi Towers Date: Sat, 8 Jul 2023 21:07:02 -0700 Subject: [PATCH 2/2] add note explaining that list = vector --- exercises/practice/sublist/.docs/instructions.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/exercises/practice/sublist/.docs/instructions.md b/exercises/practice/sublist/.docs/instructions.md index 72a275f6b..400d10f71 100644 --- a/exercises/practice/sublist/.docs/instructions.md +++ b/exercises/practice/sublist/.docs/instructions.md @@ -1,5 +1,7 @@ # Instructions +Note: This exercise is called "sublist" to remain consistent across tracks. But in Clojure lists are rarely used to represent data, so instead you will be dealing with vectors. Therefore, each occurrance of the word "list" in these instructions should be interpreted as "vector". + Given two lists determine whether : - the first list is contained within the second - the second list is contained within the first list @@ -18,9 +20,9 @@ The function `classify` should either return `:sublist`, `:superlist`, `:equal` ### Examples: - * A = (1, 2, 3), B = (1, 2, 3, 4, 5), A is a sublist of B - * A = (3, 4, 5), B = (1, 2, 3, 4, 5), A is a sublist of B - * A = (3, 4), B = (1, 2, 3, 4, 5), A is a sublist of B - * A = (1, 2, 3), B = (1, 2, 3), A is equal to B - * A = (1, 2, 3, 4, 5), B = (2, 3, 4), A is a superlist of B - * A = (1, 2, 4), B = (1, 2, 3, 4, 5), A is neither a superlist, sublist nor equal to B : they are unequal + * A = [1 2 3], B = [1 2 3 4 5], A is a sublist of B + * A = [3 4 5], B = [1 2 3 4 5], A is a sublist of B + * A = [3 4], B = [1 2 3 4 5], A is a sublist of B + * A = [1 2 3], B = [1 2 3], A is equal to B + * A = [1 2 3 4 5], B = [2 3 4], A is a superlist of B + * A = [1 2 4], B = [1 2 3 4 5], A is neither a superlist, sublist nor equal to B : they are unequal