'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH List.find 3 2025-11-29 "Tomo man-pages" .SH NAME List.find \- find an element's index .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI List.find\ :\ func(list:\ [T],\ target:\ T\ ->\ Int?) .fi .SH DESCRIPTION Finds the index of the first occurrence of an element (if any). .SH ARGUMENTS .TS allbox; lb lb lbx lb l l l l. Name Type Description Default list [T] The list to search through. - target T The item to search for. - .TE .SH RETURN The index of the first occurrence or `none` if not found. .SH EXAMPLES .EX assert [10, 20, 30, 40, 50].find(20) == 2 assert [10, 20, 30, 40, 50].find(9999) == none .EE .SH SEE ALSO .BR Tomo-List (3)