combinators
Explanation of combinators for the working man
What is a combinator?? Is it \"a function or definition with no free variables\" (as defined on SO)? Or how about this:according to John Hughes in his well-known paper on Arrows, \"a combinator is a[详细]
2023-04-07 07:16 分类:问答Shorter way to write this code
The following pattern appears very frequently in Haskell c开发者_如何学编程ode. Is there a shorter way to write it?[详细]
2023-04-05 07:10 分类:问答Expressing Y in term of SKI-Combinators in JavaScript
I was fiddling with combinators in JavaScript and was being proud of (hopefully) getting S to work when I stumbled upon Wikipedia saying: "The Y combinator can be expressed in the SKI-calculus as[详细]
2023-04-04 01:54 分类:问答How to encode a constraint on the format of String values
As I frequently observe and how I often implement a name attribute, is to simply model it as String. What now, if the name has to follow a certain syntax, i.e. format? In Java I probably would define[详细]
2023-03-31 00:21 分类:问答Unsure of how to design a useful library using combinators
I\'ve been reading about combinators and seen how useful they are (for example, in Haskell\'s Parsec).My problem is that I\'m not quite sure how to use them practically.[详细]
2023-03-28 06:51 分类:问答Better interface for composing destructive operators, Part II
See my earlier question about composing opencv operators for an explanation of what is going on. I thought up a new interface that allows to compose destructive binary operations in a kind of composa[详细]
2023-03-07 11:17 分类:问答What are some interesting uses of higher-order functions?
I\'m currently doing a Functional Programming course and I\'m quite amused by the concept of higher-order functions and functions as first class citizens. However, I can\'t yet think of many practical[详细]
2023-02-28 16:12 分类:问答How to use groupBy and zip in real practice?
import Data.List.Split import Data.List(nub, groupBy) z = splitOn \"+\" \"x^2+2*x^3+x^2\" y = map (splitOn \"*\") z[详细]
2023-02-26 16:20 分类:问答Designing a monadic type
I\'d need some help to design a monadic datatype, I seem to have trouble wrapping my head around the idea, but I pretty definitely know what I want. Only the type checker seems to require some persuad[详细]
2023-02-11 18:37 分类:问答How does Data.MemoCombinators work?
I\'ve been looking at the source for Data.MemoCombinators but I can\'t really see where the heart of it is.[详细]
2023-02-10 16:43 分类:问答