     assert Enum.sample(1..1) == 1
     # set a fixed seed so the test can be deterministic
     # please note the order of following assertions is important
-    seed = {1406, 407414, 139258}
-    :random.seed(seed)
+    seed1 = {1406, 407414, 139258}
+    seed2 = {1406, 421106, 567597}
+    :random.seed(seed1)
     assert Enum.sample(1..2) == 2
     assert Enum.sample(1..3) == 2
     assert Enum.sample(1..4) == 4
     assert Enum.sample(1..5) == 1
-    :random.seed(seed)
+    :random.seed(seed1)
     assert Enum.sample(?a..?z) == ?i
-    :random.seed(seed)
+    :random.seed(seed1)
     assert Enum.sample(?0..?9) == ?8
+    :random.seed(seed2)
+    assert Enum.sample(1..2) == 1
+    assert Enum.sample(1..3) == 3
+    assert Enum.sample(1..4) == 1
+    assert Enum.sample(1..5) == 5
+    :random.seed(seed2)
+    assert Enum.sample(?a..?z) == ?a
+    :random.seed(seed2)
+    assert Enum.sample(?0..?9) == ?0
   end
 
   test :sample_2 do

    assert Enum.sample(1..2, 0) == []
    # set a fixed seed so the test can be deterministic
    # please note the order of following assertions is important
    seed = {1406, 407414, 139258}
    :random.seed(seed)
    assert Enum.sample(1..5, 1) == [2]
    assert Enum.sample(1..5, 2) == [4, 1]
    assert Enum.sample(1..5, 3) == [1, 3, 5]
    assert Enum.sample(1..5, 4) == [3, 5, 1, 2]
    assert Enum.sample(1..5, 5) == [1, 2, 5, 4, 3]
    assert Enum.sample(1..5, 6) == [2, 4, 5, 3, 1]
    :random.seed(seed)
    assert Enum.sample(?a..?z, 1) == 'i'
    assert Enum.sample(?a..?z, 2) == 'cm'
    assert Enum.sample(?a..?z, 3) == 'alp'
    assert Enum.sample(?a..?z, 4) == 'tzmd'
    assert Enum.sample(?a..?z, 5) == 'cuxvb'
    :random.seed(seed)
    assert Enum.sample(?0..?9, 1) == '8'
    assert Enum.sample(?0..?9, 2) == '07'
    assert Enum.sample(?0..?9, 3) == '018'
    assert Enum.sample(?0..?9, 4) == '0856'
    assert Enum.sample(?0..?9, 5) == '03698'
  end

  test :scan do

    assert Enum.sample([1]) == 1
    # set a fixed seed so the test can be deterministic
    # please note the order of following assertions is important
    seed1 = {1406, 407414, 139258}
    seed2 = {1406, 421106, 567597}
    :random.seed(seed1)
    assert Enum.sample([1, 2]) == 2
    assert Enum.sample([1, 2, 3]) == 2
    assert Enum.sample([1, 2, 3, 4]) == 4
    assert Enum.sample([1, 2, 3, 4, 5]) == 1
    :random.seed(seed2)
    assert Enum.sample([1, 2]) == 1
    assert Enum.sample([1, 2, 3]) == 3
    assert Enum.sample([1, 2, 3, 4]) == 1
    assert Enum.sample([1, 2, 3, 4, 5]) == 5
  end

  test :sample_2 do
