Skip to main content

Questions tagged [functional-programming]

-1 votes
0 answers
52 views

I'm trying to understand the code of the functional language Factor. Many functions defined by mutual recursion, untangling a tangle of snakes, looking for tails. How can I clearly write down what I ...
George Cherevichenko's user avatar
0 votes
0 answers
79 views

I am trying to understand what is and isn't a 'program' in functional programming languages, in the way that all programs should return something (or, that they are values) and that programs are ...
MukundKS's user avatar
  • 109
5 votes
0 answers
193 views

Question Working in System F, consider the following type: $$ T = \forall A.\,((A \to A)\to P)\to Q $$ Here $P$ and $Q$ are fixed types (free type variables). We only consider pure lambda terms in ...
winitzki's user avatar
  • 697
12 votes
1 answer
658 views

I am not sure which stackexchange site is the best one to ask this question on; please tell me if you think it should go somewhere else. Many programming languages have a notion of named or labeled ...
Mike Shulman's user avatar
2 votes
1 answer
208 views

In J. Backus's Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs (1977), section 5.1, he wrote, ...
Guanyuming He's user avatar
1 vote
0 answers
73 views

Title. Looking to build an experimental, minimal, functional, and pure SMT solver that hooks into the backends of Dafny and Verus. I'm happy using or looking into any functional programming language ...
Synchronous's user avatar
3 votes
3 answers
221 views

Say I have the following dictionary of abstract operations, written in Haskell for relatively concise notation: ...
Sebastian Graf's user avatar
3 votes
2 answers
256 views

Following Wadler's paper "Recursive types for free" and having spent some months on reconstructing the proof that $\exists A. ~ A \times (A\to F~ A)$ is the terminal $F$-coalgebra, I am ...
winitzki's user avatar
  • 697
5 votes
0 answers
208 views

This is somewhat related to How to encode a function from an existential type Existential types can be encoded in System F. If $P$ is any type constructor, not necessarily covariant, then the ...
winitzki's user avatar
  • 697
2 votes
1 answer
169 views

This law about bind and function composition type checks: bind m (f o g) = f (bind m g) but it is not clear whether it is true and how can it be proved. How could ...
Gergely's user avatar
  • 123
4 votes
3 answers
393 views

This question is about using relational parametricity to resolve practical questions in pure functional programming in System F. Consider the following type of polymorphic functions: $$T = \forall a. ...
winitzki's user avatar
  • 697
4 votes
1 answer
286 views

Many different kinds of optimization problems can be expressed as Mixed Integer Linear Programming (MILP). The translation is usually very direct, and one has to encode invariants as constraints in a ...
Turion's user avatar
  • 668
1 vote
0 answers
92 views

In various places I have read that the normally considered non-primitive recursive Ackermann function is primitive recursive in higher-order logic. It's claimed to be due to "Reynolds, 1985",...
Ilk's user avatar
  • 990
0 votes
0 answers
122 views

Functional data structures, or immutable data structures, are often achieved by copying old data to new data upon operation. Naively, it looks much less efficient than their imperical counterpart. ...
Student's user avatar
  • 127
4 votes
2 answers
519 views

I always understood functions in functional programming to be modeled by morphisms in the category of types, where any powerful function you write in your code is a morphism that is the composition of ...
Ryan's user avatar
  • 43

15 30 50 per page
1
2 3 4 5
10