The following Agda code: yields: after I type C-c C-l. (Note: "22,6-13" identifies the second occurrence of the word "distrib".) I don't unders ...
The following Agda code: yields: after I type C-c C-l. (Note: "22,6-13" identifies the second occurrence of the word "distrib".) I don't unders ...
Is (sequence .) . flip fmap the same as forM? I ask here because pointfree.io seems not to say the same... ...
I was writing the following proof in Idris: But of course that's not really what I wrote. What I wrote instead is this: If I were writing this i ...
It works for every xs list when f is strict. Can anyone give me example, why with non-strict f it doesnt work? ...
I'll say right off the bat this is for an assignment, and I'm not looking for an answer - just some direction, since I've been working on it for quite ...
I found this exercise on equational reasoning and proofs in Haskell. The following code is given: Now I have to prove that exec(comp e) s = eval e ...
Can you prove that if return a = return b then a=b? When I use =, I mean in the laws and proofs sense, not the Eq class sense. Every monad that I kno ...
How do I do the induction to establish the statement moll n = doll n, with I tried to prove the base case for n = 0 Now for n+1, show that B ...
Mind this program: Both definitions of sum are identical up to equational reasoning. Yet, compiling the second definition of works, but the first o ...
I am following the Functional Programming in Scala lecture on Coursera and at the end of the video 5.7, Martin Odersky asks to prove by induction the ...
I would expect the two to mean the same, from a functional equational standpoint, however: Why is sum failing here? ...
One of the excercises in "Thinking Functionally With Haskell" is about making a program more efficient using the fusion law. I am having some trouble ...
Reading "Thinking Functionally with Haskell" I came across a part of a program calculation that required that map sum (map (x:) xss) be rewritten as m ...
Im trying to evaluate manually fc [f1, f2] (\x -> 2) 3 but I don't realize how to match the three parameters: [f1, f2], (\x -> 2) and 3 with the ...
I'm trying to understand how Haskell evalutes pp1 [1,2,3,4] to get [(1,2),(2,3),(3,4)] here: I start like this: Any help? ...
I'm trying to understand how Haskell evalutes sep [1, 2, 3, 4, 5] to get ([1, 3], [2, 4, 5]) where: I start like this: but then? ...
I understand simple foldr statements like However, I'm having trouble with more complicated foldr statements, namely ones that take 2 parameters in ...
well, this is the definition of the filter function using foldr: so for example let's say i have this function: so it will be: and this will ...