Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 1
1 answer
73 views

Let's say we have a functional interface for processing annotations (AnnotationProcessor) that takes the annotation class it will work with as a parameter. We then define three of these processors; I'...
Advice
0 votes
2 replies
67 views

I'm new to functional programming, and I'm trying to write a function that takes a list (of indeterminate size) of values and return a string of a formatted version of each value. For instance (in ...
Advice
2 votes
5 replies
111 views

Probably too general of a question, but it came to mind after watching a YouTube video of a guy talking about recursion schemes and performance in functional languages when compared to C. In my mind, ...
Best practices
0 votes
2 replies
58 views

I’m designing an API for order batching and would like opinions on one specific design choice. Context: An API request gives me only a tenant_id From tenant_id, I load warehouse_layout From ...
Best practices
1 vote
8 replies
173 views

This isn't a what am I doing wrong? Rather, I'm surprised this works, what's the rationale?/might it all quickly turn to custard. By ‘ambiguous’ we mean that there is a type variable e that appears ...
Score of 3
2 answers
179 views

Since closed type families have all their clauses appearing together and therefore can't be extended with other clauses, and since GHC can detect violations of injectivity annotations anyway (even for ...
Advice
1 vote
16 replies
378 views

We're avid Perl programmers but we have been really wanting to get into Haskell or Erlang or something similar, though we don't know where to start. Any languages you guys recommend? if so, send some ...
Score of 2
1 answer
163 views

My question comes for the fact that I don't fully understand the nuances of declaring datatypes. I think I get lost in all the degrees of freedom out there: do I use GADT syntax or not? Do I spell out ...
Score of 3
1 answer
126 views

Section §13.2 from Haskell in Depth is about "faking" dependent types in Haskell via singletons. Below is one snippet of code from that section: doorState :: forall s. Door s -> DoorState ...
Score of 2
2 answers
161 views

Say I define this datatype in my library data Foo = Foo (String, String, String, String) and that I expose a bunch of things do use it, but that the client really only needs to construct a Foo and ...
Advice
3 votes
8 replies
240 views

Functional programming languages like Haskell or OCaml go though some effort to make curried functions have reasonable performance compared to uncurried functions. I am curious if V8 has any ...
Score of 5
0 answers
186 views

tl;dr (hopefully) While writing the question below, I think I've come up with a simpler way to ask it. Assume this senario: you've never seen Maybe in Haskell before, so you don't know it's ...
Score of 6
1 answer
191 views

tl;dr Is it always possible to desugar a GADT data type into an "ordinary" data type? (Similar question from 2018, but the ansewer (same age) doesn't address the general case, and the ...
Score of 1
1 answer
65 views

I am following the lean tutorial and I've arrived at the exercise where I have to implement the Functor typeclass for a simple binary tree inductive type. This is the code for defining the tree type: ...
Score of 4
3 answers
199 views

This question springs from another earlier question of mine: How can a type with all constructors having a field mapped to Void via a type family have any values at all?, because one implication of ...

15 30 50 per page
1
2 3 4 5
1284