So I have this function in my code At one point it is used like so I can clearly see that it chooses between the (+) or (-) function and then ap ...
So I have this function in my code At one point it is used like so I can clearly see that it chooses between the (+) or (-) function and then ap ...
I recently saw a simple example that brought <* and *> to light. This shows that the effects are important even if the values they produce ar ...
From my lecture, I learn that the type of the expression (n `mod` 2 == 0) is Int -> Bool why it is not Int -> Int -> Bool ? n `mod` 2 has th ...
I'd like to check my function signatures mean what I think they mean. I can of course check the positive variants but I'd like to test some negativ ...
I'm doing some Haskell exercises from here: https://wiki.haskell.org/99_questions/Solutions/1 where it shows the solution but it does not show how to ...
I have this function which takes an integer n, and returns the number of integers less than n which are coprime with n. I don't know where my code mig ...
Given a function like negate, it has the type signature: which I would describe as a being the type in the context of Num (correct me if you think ...
I am trying to build my own simple graph library that I can use for advent of code. I have a type class Graph and one concrete implementation MapGraph ...
How do I write the type signature of this function in Haskell? It decides if a date is earlier than the other one and print out True/False. ...
I have to convert a Haskell type signature into a term. The type signature is : The correct resulting term is : and here lies my problem as I un ...
Hi I am having troubles understanding the type signature that I need for my function. In this function I take a table which is a map of Hash values ...
I've just started to learn Haskell after coming from Python, and I've got a couple of questions about functions. I've written the following code: F ...
I'm trying to create an iterative function that takes in an 'a => 'a function, and a natural number which indicates how many times to iterate this ...
Looking at the predicates like skip_while and take_while they're If a predicate is just returning true or false, and not modifying the values, why ...
Once I have successfully solved an exercise for Functor typeclass: Solving another exercise I needed to define Enum typeclass functions for a custo ...
First I define the following data type Then I want to implement a function which maps to a Supply with the following type signature: And here is ...
I am a beginner in Haskell and I am taken aback by the undefined function's type signature. I expected something more simple, but I found this on Hac ...
I have the following two similar function definitions: When I check the type signatures of the two functions, I am confused by the following types: ...
Noob question on MonadWriter: Why is it that String comes first in the typesig and Int second, while 3003 is clearly an Int while "log 1\n" is a S ...