Search a list of records: Difference between revisions
m
→{{header|Arturo}}
m (→{{header|BASIC}}: simplify control flow) |
Drkameleon (talk | contribs) |
||
Line 762:
=={{header|Arturo}}==
<lang rebol>
define :city [name population][]
records: map [
Line 775 ⟶ 777:
["Abidjan" 4.4]
["Casablanca" 3.98]
] => [to :city &]
find: function [block f][
Line 791 ⟶ 793:
; Print the population of the first city starting with 'A'.
print get first find records $[c][equal? first c\name `A`] 'population</lang>
{{out}}
|