<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<span style="background-color: rgba(255, 255, 255, 0);">I'm trying to adopt the RandomAccessCollection protocol from a class. I deliberately leave out the <code style="margin: 0px; padding: 1px 5px; border: 0px;">func index(before:)</code> function because
there is already a default implementation of that function in RandomAccessCollection. I do understand that that function's implementation is required because of BiDirectionalCollection from which RandomAccessCollection inherits. </span>
<div><span style="background-color: rgba(255, 255, 255, 0);"><br>
</span></div>
<div><span style="background-color: rgba(255, 255, 255, 0);">My question is why would the compiler complain that func index(before:) implementation is required when there is already a default implementation in RandomAccessCollection that i can use? </span></div>
<div><span style="background-color: rgba(255, 255, 255, 0);"><br>
</span></div>
<div><span style="background-color: rgba(255, 255, 255, 0);">Thanks.</span>
<div></div>
</div>
</body>
</html>