Skip to content

Recommended changes to shell-project version to support app.md re-write #16

@turbomarc

Description

@turbomarc

The app.md lesson might go more smoothly with a few changes to the shell-project version of global-growth. If the current version is also used for other lessons that would be impacted by these changes, please consider an alternate branch for the proposed app.md version.

*1. Add the following constants and helpers to core.clj:

;; CONSTANTS
(def base-uri "http://api.worldbank.org")
(def list-size 10)

(defn parse-json [str]
  (json/parse-string str true))

*2. Add a line calling out

;; SUPPORTING FUNCTIONS

above the pre-populated supporting functions section.

*3. Include the complete lines for:

(defn view-ind
  [indicator1 indicator2 year]
  (let [inds1 (sorted-indicator-map
                (get-indicator-all indicator1 year :country :value))
        inds2 (sorted-indicator-map
                (get-indicator-all indicator2 year :country :value))]

instead of:

(defn view-ind
  [indicator1 indicator2 year]
  (let [inds1 (<<FILL IN THE BLANK>>)

        inds2 (<<FILL IN THE BLANK>>)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions