foldr1 and foldl1 are too restrictive
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 36/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Domínio
- backend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- PureScript
- Estrelas
- 51
- Forks
- 57
- Merge médio
- 3d 14min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de purescript/purescript-foldable-traversable
-
Add `count`Abertastatus: accepted type: enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
purescript/purescript-foldable-traversable#140 · 7 comentários ·
-
type: documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
purescript/purescript-foldable-traversable#139 · 1 comentário ·
-
`Data.Traversable` re-exports `sum` from `Data.Foldable` but not `product`Talvez já em andamento @triallax assumiu há 1959 dias. Abertatype: enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 25/100
purescript/purescript-foldable-traversable#137 · 5 comentários ·
-
foldrMAbertatype: enhancement
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
purescript/purescript-foldable-traversable#136 · 3 comentários ·
-
purs-0.15 type: breaking change
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 25/100
purescript/purescript-foldable-traversable#132 · 4 comentários ·
Todas as issues de purescript/purescript-foldable-traversable
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFAbertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Mend: dependency security vulnerability
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Mend: dependency security vulnerability
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
ManageIQ/manageiq-pods#1476 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
prime-radiant-inc/evener#6366 ·
Mantenedores costumam responder em até 1 dia