country:   ISO country database
1 Reference
1.1 Regions
region?
region-name
all-regions
1.2 Countries
country?
country-region
country-common-name
country-official-name
country-code/  alpha-2
country-code/  alpha-3
country-code/  numeric
all-countries
country-ref
region-countries
1.3 Subdivisions
subdivision?
subdivision-country
subdivision-code
subdivision-name
all-subdivisions
country-subdivisions
7.4

country: ISO country database

Bogdan Popa <bogdan@defn.io>

 (require country) package: country

This library provides facilities for working with standardized country data. It is based on the Debian pkg-isocodes and mledoze/countries databases.

1 Reference

1.1 Regions

 (require country/region) package: country

procedure

(region? v)  boolean?

  v : any/c
Returns #t when v is a region.

procedure

(region-name r)  string?

  r : region?
Returns the name of r.

A list of all the known regions.

1.2 Countries

 (require country/country) package: country

procedure

(country? v)  boolean?

  v : any/c
Returns #t when v is a country.

procedure

(country-region c)  region?

  c : country?

procedure

(country-common-name c)  string?

  c : country?

procedure

(country-official-name c)  string?

  c : country?

procedure

(country-code/alpha-2 c)  symbol?

  c : country?

procedure

(country-code/alpha-3 c)  symbol?

  c : country?

procedure

(country-code/numeric c)  (integer-in 1 999)

  c : country?
Accessors for the various properties on c.

A list of all the known countries.

procedure

(country-ref selector)  (or/c false/c country?)

  selector : (or/c (integer-in 1 999) string? symbol?)
Looks up a country based on one of its (case-insensitive) names or codes. Returns #f when no country matches the given selector.

procedure

(region-countries r)  (non-empty-listof country?)

  r : region?
Returns a list of all countries within the given r.

1.3 Subdivisions

 (require country/subdivision) package: country

procedure

(subdivision? v)  boolean?

  v : any/c
Returns #t when v is a subdivision.

procedure

(subdivision-country s)  country?

  s : subdivision?

procedure

(subdivision-code s)  symbol?

  s : subdivision?

procedure

(subdivision-name s)  string?

  s : subdivision?
Accessors for the various properties on s.

A list of all the known subdivisions.

Returns a list of all subdivisions within the given c.