Description text of `difference`

Aperta
#246 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
55/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Ambito
documentation

Direzione di ricerca

Read the difference documentation linked in the issue and compare its wording with the provided example. Clarify that each element in the second array is matched and removed from the first array from left to right; done when the description explains why the result is [1].

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Example:

difference [2, 1, 2] [2, 2, 3] == [1]

https://pursuit.purescript.org/packages/purescript-arrays/7.3.0/docs/Data.Array#v:difference

Delete the first occurrence of each element in the second array from the first array, creating a new array.

I read the description as follows:

  • each element in the second array: 2, 2, 3
  • first occurrence of each element in the second array: 2, 3
  • delete [2,3] from the first array: [2,1,2] ---> deleting [2,3] ---> [1,2]

This would be a clearer description of what this function does:

For each element in the second array, find an occurrence from left to right in the first array and remove it when found.

I think the word "first" should be avoided, because in the example above then second 2 from [2,2,3] is matched against the second 2 from [2,1,2].

Lingua principale
PureScript
Stelle
58
Fork
70
Merge medio
2g 22h
PR unite (30g)
1

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di purescript/purescript-arrays

Tutte le issue di purescript/purescript-arrays

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.