python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Folding indexed functors with access to contextual data
This is a question about traversing mutually recursive data types. I am modeling ASTs for a bunch of mutually recursive datatypes using Indexed Functor as described in this gist here. This works well ...
cdr
Votes: 0
Answers: 1
Using functor in thread in c++
I am trying to call a functor in std thread and trying to find the data member value after thread complete. But it is not showing expected output, here I think I am missing something, can anyone figur...
Gautam Jangid
Votes: 0
Answers: 0
Why Am I Getting GHC Couldn't Match Type Error in Functor Instance?
I am trying to write a Functor instance:
module TreeN where
data TreeN a = LeafN a | ParentN a [TreeN a] deriving (Eq, Show)
instance Functor TreeN where
fmap f (LeafN x) = LeafN (f x)
fmap f (Pare...

James Strieter
Votes: 0
Answers: 1
How do I make my custom data type an instance of Functor?
I have this data type:
data F a b = F (a -> b)
My task is to make this type an instance of the Functor class.
I understand how to do this with the usual examples. i.e. Maybe.
Usually, the given fu...

Luke Tynan
Votes: 0
Answers: 2