Anonymous user
Search a list of records: Difference between revisions
m
→{{header|Nim}}
m (Formatting.) |
m (→{{header|Nim}}) |
||
Line 1,853:
=={{header|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.
|