currying
Syntax for partial application of curried functions with reverse-associative infix notation
In other words, is there a good reason why this shouldn\'t compile? def f(xs: List[Int]) = xs.foldLeft(0) _// OK[详细]
2023-04-12 04:41 分类:问答Applying an argument list to curried function using foldLeft in Scala
Is it possible to do a foldLeft on a list of arguments, where the initial value supplied to the fold is a fully curried function, the operator is apply, and the list is a list of arguments to be passe[详细]
2023-04-09 19:13 分类:问答OCaml expression type issue
I am trying to make an OCaml function that addsthe number of \'a\'s in a string to a given argument.[详细]
2023-04-09 08:02 分类:问答Case classes, pattern matching and curried constructors in Scala
They don\'t seem to mix that well: abstract class A case class B (var a: Int)(var b: String) extends A case class C extends A[详细]
2023-04-01 15:43 分类:问答What is the point of multiple parameter clauses in function definitions in Scala?
I\'m trying to understand the point of this language feature of multiple parameter clauses and why you would use it.[详细]
2023-04-01 05:56 分类:问答Does Haskell have variadic functions/tuples?
The uncurry function only works for functions taking two arguments: uncurry :: (a -> b -> c) -> (a, b) -> c[详细]
2023-03-31 02:09 分类:问答Scala, currying and overloading
Say you have the following: foo(x: String)(y: Int): Int foo(x: String)(y: Double): Int Scala does not allow such expression. As far as I can see, the reason for this is that foo(\"asdf\") does not[详细]
2023-03-30 17:26 分类:问答Haskell function definition syntax
I\'m doing lists concatenation in the following ways (an example, using GHC): myConcat :: [[a]] -> [a][详细]
2023-03-22 07:59 分类:问答What's the difference between multiple parameters lists and multiple parameters per list in Scala?
In Scala one can write (curried?) functions like this def curriedFunc(arg1: Int) (arg2: String) = { ... }[详细]
2023-03-22 06:31 分类:问答How does currying work?
I\'m very new to Haskell and FP in general. I\'ve read many of the writings that describe what currying is, but I haven\'t found an explanation to how it actually works.[详细]
2023-03-19 04:44 分类:问答