functor
unpacking, function application, and packing tuples in C++0X
What is the best way to write the readvals function in the following code without using Boost? Basically, it should get a tuple, call a specific function of it\'s elemets and return the generated resu[详细]
2023-03-28 16:10 分类:问答combining 3 functors into 1
I have 3 functors and was wondering if these can be combined into 1, perhaps as a template. is it possible? if so, how would I do it. thx![详细]
2023-03-28 08:48 分类:问答Are there morphisms in Haskell?
I have some GADT which开发者_运维百科 represents a term in the lambda-calculus. data Term a = Var a[详细]
2023-03-27 20:28 分类:问答Applicative without a functor
I have a type Image which is basically an c-array of floats. It is easy to create functions such as map :: (Float -> Float) -> Image -> Image, or zipWith :: (Float -> Float -> Float) -[详细]
2023-03-27 02:15 分类:问答Which algorithms require functors to be pure functions?
Generall开发者_运维技巧y the standard requires functors to be pure functions because algorithms are allowed to copy their functors to their heart\'s content. However, there are some algorithms (e.g. f[详细]
2023-03-25 22:36 分类:问答Search value in a functor's c'tor
Say I had a std::vector<std::pair<int, std::vector<int> > >, that is, a vector containing pairs of ints to vectors. ( I know I could acheive the same thing with a map, but that\'s no[详细]
2023-03-24 07:06 分类:问答Lambda expression as member functors in a class
I was thrilled when lambda expressions (LE) were part of the gcc starting a 4.5.1 and hoped they would grant a way of getting rid of those nasty functions pointer in C++, which were basically, to my u[详细]
2023-03-24 06:27 分类:问答Ocaml Functors, Modules and Submodules
Apologies for posting such long, non-compilable code. But despite reading several questions and answers on stackoverflow on ocaml\'s functors, I don\'t get how to solve this:[详细]
2023-03-24 05:57 分类:问答How do C++ functor constructors get called when used with for_each or std::transform
I\'ve never used c++ functors before and so I\'m just trying to understand how they work. e.g. suppose we have this functor class[详细]
2023-03-22 01:31 分类:问答Modules and record fields
I have stumbled across a rather simple OCaml problem, but I can\'t seem to find an elegant solution. I\'m working with functors that are applied to relatively simple modules (they usually define a typ[详细]
2023-03-21 09:02 分类:问答