partial-application
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 分类:问答Producing a partially applied function from method of type in an Option
Suppose I\'m writing a GUI class Kitteh (val age: Int) { require (age < 5) def saveMeow(file: File) = { /* implementation */ }[详细]
2023-04-03 10:40 分类:问答Why scala can't infer the type in a partial method?
See this example: def hello(a:String, b:String) = println(a + \":\" + b) val m1 = hello(\"aaa\", _ ) m1(\"bbb\")[详细]
2023-03-29 02:57 分类:问答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 to partially apply member functions in JavaScript?
I currently 开发者_如何学JAVAhave a partial-application function which looks like this: Function.prototype.curry = function()[详细]
2023-03-18 14:15 分类:问答Ordering of parameters to make use of currying
I have twice recently refactored code in order to change the order of parameters because there was too much code where hacks like flip or \\x -> foo bar x 42 were happening.[详细]
2023-03-02 21:57 分类:问答How is a partial application represented at runtime?
When I write something like map (1+) list in Haskell, what is the internal representation of (1+)? Since it is a partial application of (+), the argument 开发者_运维技巧1 has to be saved somewhere, bu[详细]
2023-02-22 06:26 分类:问答Is it possible to get the name of a partially applied function?
Suppose I have defined a function: def hello(name:String, words:String) = println(\"Hello!\" + name + words)[详细]
2023-02-17 23:35 分类:问答Get arguments back from partially applied function in scala
Is there a way in scala to get the arguments back from a already partially applied function? Does this even make sense, should be done, or fits into any use case?[详细]
2023-02-17 01:06 分类:问答In Python, partial function application (currying) versus explicit function definition
In Python, is it considered better style to: explicitly d开发者_开发知识库efine useful functions in terms of more general, possibly internal use, functions; or,[详细]
2023-02-13 11:29 分类:问答