Search a list of records: Difference between revisions

Content added Content deleted
(Scala contribution maintained.)
Line 2,167: Line 2,167:


=={{header|Scala}}==
=={{header|Scala}}==
{{Out}}See it in running in your browser by [https://scalafiddle.io/sf/8OlRzf8/0 ScalaFiddle (JavaScript executed in browser)] or by [https://scastie.scala-lang.org/fGhNDUNHRqq8h04x3Mm2Kw Scastie (remote JVM)].
<lang Scala>object SearchListOfRecords extends App {
<lang Scala>object SearchListOfRecords extends App {
val cities = Vector(
val cities = Vector(
Line 2,195: Line 2,196:


}</lang>
}</lang>
{{Out}}
{{Out}}See it in running in your browser by [https://scalafiddle.io/sf/8OlRzf8/0 ScalaFiddle (JavaScript executed in browser)] or by [https://scastie.scala-lang.org/efKOmJgiQv6Q52h2WXYcig Scastie (remote JVM)].
{{Out}}<pre>Index of first city whose name is 'Dar Es Salaam' = 6
<pre>Index of first city whose name is 'Dar Es Salaam' = 6
Name of first city whose population is less than 5 million = Khartoum-Omdurman
Name of first city whose population is less than 5 million = Khartoum-Omdurman
Population of first city whose name starts with 'A' = 4,580,000
Population of first city whose name starts with 'A' = 4,580,000</pre>

</pre>
=={{header|Scheme}}==
=={{header|Scheme}}==
{{libheader|Scheme/SRFIs}}
{{libheader|Scheme/SRFIs}}