foldr1 and foldl1 are too restrictive
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 36/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend
Direzione di ricerca
Start by comparing the proposed and current foldr1 signatures in the issue, then trace their definitions and the corresponding foldl1 implementation in the repository. Check existing tests for these functions and determine whether the proposed terminal-value mapping behavior can be supported without a full traversal; done means the API decision and its behavior are covered by tests. The issue has had no comment activity for over four years.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Should the signature of foldr1 (and similarly foldl1) be:
foldr1 :: forall f a b. Foldable1 f => (a -> b -> b) -> (a -> b) -> f a -> b
I understand the logic behind the current signature:
foldr1 :: forall f a b. Foldable1 f => (b -> b -> b) -> f b -> b
In that, if I have a mapping from a -> b, then I can pre-map unconditionally, and derive the latter signature. Unfortunately that's not actually what I want to do:
- I only want the mapping to apply to the terminal value.
- I want to otherwise combine with the combining function.
- I don't want to waste an entire traversal to make the signature work.
I feel like there's a missed opportunity with the current signature. To be honest, I almost never want the current signature.
- Lingua principale
- PureScript
- Stelle
- 51
- Fork
- 57
- Merge medio
- 3g 14m
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di purescript/purescript-foldable-traversable
-
Add `count`Apertastatus: accepted type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
purescript/purescript-foldable-traversable#140 · 7 commenti ·
-
type: documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
purescript/purescript-foldable-traversable#139 · 1 commento ·
-
`Data.Traversable` re-exports `sum` from `Data.Foldable` but not `product`Forse già presa @triallax l’ha presa 1959 giorni fa. Apertatype: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
purescript/purescript-foldable-traversable#137 · 5 commenti ·
-
foldrMApertatype: enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
purescript/purescript-foldable-traversable#136 · 3 commenti ·
-
purs-0.15 type: breaking change
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
purescript/purescript-foldable-traversable#132 · 4 commenti ·
Tutte le issue di purescript/purescript-foldable-traversable
Issue simili
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ManageIQ/manageiq-pods#1476 ·
I maintainer di solito rispondono entro 1 giorno
-
mcp: typed tool handlers lose wrapped JSON-RPC errorsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
modelcontextprotocol/go-sdk#1529 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FinanceFlash/unvibecode#818 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100