The (covariant) functor definition in cats-laws looks like this: But if I translate the functor composition rule to Scala, it should be: Why a ...
The (covariant) functor definition in cats-laws looks like this: But if I translate the functor composition rule to Scala, it should be: Why a ...
I admit, that my question may stem from a lack of knowledge and be rather vague. But I try to understand, have some doubts and can't resolve them. So ...
Recently I've been trying to create a C++ concept around Haskell's Functor. Something like this: The problem is with function and A type. If I put ...
I've got an interesting puzzle that I can't seem to completely solve. The following code is a snipped for my own function implementation. When I try t ...
I've been wondering what a complete, all-encompassing context for instance Functor (f :.: g) would be. The immediate thought that pops into my head is ...
I've got this hash function is C style: Then I try to use it for unordered_map's hash parameter. Do I always need to write a c++ functor as a wrapp ...
Working on a project and trying to write longzip using an anamorphism. I'm having some trouble writing a coalgebra for this use case. I've defined my ...
I'm using Fix to define some datatypes for a project I'm working on. I need those datatypes to be instances of the equality typeclass Eq for unit test ...
. Answers to this question are eligible for a +350 reputation bounty. R ...
I am having trouble implementing a recursive functor instance. I have tried as follow, but I receive an error that cannot construct the infinite type: ...
We are given How may I write a functor instance for LST, such that ...
Currently compilation fails with following error Context: This structure is used to represent documents with sections which can have multiple level ...
In order to learn more about Go, generics, and functional programming, I implemented a List type (excerpt of list.go): package funcprog type Functio ...
I understand the advantage of IO monad and List Monad over Functor, however, I don't understand the advantage of Option/Maybe Monad over Functor. Is ...
I am using CUB::InclusiveScan which takes a custom binary, non-commutative, operator. When defining my Otherwise, my code is nearly identical to th ...
In Haskell, some Functor fmap In TypeScript, Similarly, in Dart, I try to implement but the second line has errors, what would be the correct ...
I'm trying to pass a type parameter to priority_queue, just like std::less or std::greater, like this: It doesn't compile, then I added decltype, s ...
I have to define the signature tEXP of a functor which, starting from a module A with signature tARITH, constructs an abstract type representing expre ...
I am trying to have a single variable with some type that can be assigned to some of the C++ standard functors (eg: std::plus, std::multiplies, etc... ...
By convention, we add a bang character ! to any function name that mutates its arguments, so for the following code example, should we add a ! to the ...