discussion: describe relation between Foldable and Unfoldable and there indexed versions

Offen
#84 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Bereich
backend

Rechercherichtung

Read the discussion about the proposed relationship between Foldable and Unfoldable and their indexed variants. The issue gives example expressions and type signatures, but no files, tests, or decided design; first determine whether the proposal is wanted and what the signatures should be before implementation.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

status: needs more info

I had an idea:

What if instead of

Map.fromFoldable $ Map.toUnfoldable someMap

You could do:

unfoldWithIndex $ foldWithIndex someMap

where

foldWithIndex   ∷ ∀ g f idx a
    . Unfoldable g
    ⇒ FolableWithIndex idx f
    ⇒ f  idx   a
    → g (idx × a)
unfoldWithIndex ∷ ∀ g f idx a
    . Foldable g
    ⇒ UnfoldableWithIndex idx f
    ⇒ g (idx × a)
    → f  idx   a

p.s. names foldWithIndex and unfoldWithIndex are arbitrary just types meter

Vorherrschende Sprache
PureScript
Sterne
51
Forks
57
Ø Merge
3 T. 14 Min.
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-foldable-traversable

Alle Issues in purescript/purescript-foldable-traversable

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

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