main_testing2/wordle_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Wed, 09 Nov 2022 18:40:57 +0000
changeset 437 d4d4669ad054
parent 435 fda7c39f3b6a
child 439 97594b9998a8
permissions -rw-r--r--
updated import


import M2._


assert(removeOne(List(1,2,3,2,1), 3) == List(1, 2, 2, 1))
assert(removeOne(List(1,2,3,2,1), 2) == List(1, 3, 2, 1))
assert(removeOne(List(1,2,3,2,1), 1) == List(2, 3, 2, 1))
assert(removeOne(List(1,2,3,2,1), 0) == List(1, 2, 3, 2, 1))
assert(removeOne(List("a", "b", "b"), "b") == List("a", "b"))