Jump to content

Search a list of records: Difference between revisions

m
m (Formatting.)
Line 1,853:
 
=={{header|Nim}}==
<lang Nim>
To solve this task, we define a template “findIt” similar to the templates provided by the standard library module “sequtils”. As First argument it accepts any collection providing a “pairs” iterator (yielding an index and a value), for instance a sequence (list) or a table (hash). The second argument of the template is a predicate, i.e. an expression containing the “it” variable.
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.