`groupBy` has unexpected `l` argument for `a -> a -> Boolean` predicate

Offen
#229 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

  • #230 von @JordanMartinez — ohne Merge geschlossen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Bereich
backend

Rechercherichtung

Start with the linked try.purescript.org example and inspect the groupBy implementation and its tests to trace how the predicate arguments are chosen. The report expects adjacent pairs (0, 1) and (1, 2) for [0, 1, 2]; determine whether the behavior is unintended, then add a regression test and confirm it passes if a change is warranted.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

See https://try.purescript.org/?gist=26968458c1261226b33e574128ba9aae

For a given array like [0, 1, 2], I expect the l and r arguments to be

  • first run: 0 and 1
  • second run: 1 and 2

However, in the second run, l is 0 rather than 1.

I'd argue that the behavior here is unexpected.

Vorherrschende Sprache
PureScript
Sterne
58
Forks
70
Ø Merge
2 T. 22 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus purescript/purescript-arrays

Alle Issues in purescript/purescript-arrays

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.