findIndex
ts
function Dll.findIndex(
dll: Dll<T>,
predicate: (value: T, link: DllLink<T>, dll: Dll<T>) => boolean
): numberReturns the index of the first element matching the predicate.
Example
ts
import { Dll } from "@monstermann/dll";
const dll = Dll.create<number>([1, 2, 3, 4, 5]);
const index = Dll.findIndex(dll, (value) => value > 3);
console.log(index); // 3