Search a list of records: Difference between revisions

m
m (→‎{{header|BASIC}}: simplify control flow)
Line 762:
=={{header|Arturo}}==
 
<lang rebol>define; :cityby [name population][]@Krenium
 
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>
 
</lang>
 
{{out}}
1,532

edits