Skip to content

First exercise too advanced? #960

Open
@Ninijura

Description

@Ninijura

The very first exercise in the book asks the reader to write code before any of the syntax has been presented:

Exercise seven (practice) {#seven}

Write out 7 in longhand.

-- Your code goes here

You will need to give both a type signature and definition for the
variable seven. Type C-c C-l in Emacs to instruct Agda to re-load.

Intuitively, reading the question, my answer would have been (suc (suc (suc (suc (suc (suc (suc zero))))))), but the next sentences then ask for a type signature and explain how to reload the code in Emacs. This makes me think that I do need to write code after all.
Since the reader does not yet know how to write Agda definitions this may cause some frustration (it certainly did for me).

An educational way of fixing this might be this:

-- seven : ℕ
-- seven = <Your code goes here>

Uncomment the code by removing the dashes and insert your definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions