racket / racket/htdp

Alias `mixed` as `one-of`

Open Beginner friendly
#255 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

signature
Dominant language
Racket
Stars
112
Forks
73
Avg merge
9h 41m
Merged PRs (30d)
1

Description

In the student languages' signature (type) annotations, function
mixed is used to describe mixed data or, as they are sometimes
called in HtDP, itemizations:

(define StringOrInteger (signature (mixed String Integer)))

An itemization is usually described in HtDP with the structured
natural language form:

A StringOrInteger is one of:
  - a String
  - an Integer

Having one-of as a synonym of mixed would help make formal type
declarations closer to the structured natural language form used in
HtDP:

(define (StringOrInteger (signature (one-of String Integer))

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation of the student languages' mixed signature annotation and any tests covering signature aliases. Add one-of as its synonym, then update or add tests showing that it accepts the same type forms as mixed.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.