functional-programming
Pythagorean triple in Haskell without symmetrical solutions
I gotta do the Pythagorean triple in Haskell without symmetrical solutions. My try is: terna :: Int -> [(Int,Int,Int)][详细]
2023-04-01 07:17 分类:问答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 分类:问答Approach to designing large functional programs
I\'ve been reading lots on functional languages and would like to maybe play with re-writing some parts of my appl开发者_开发知识库ication in F#.Is it better to design from the outside in or the insid[详细]
2023-04-01 05:21 分类:问答Function.apply not using thisArg parameter
I\'m writing some Actionscript3 code that attempts to apply a method to an object that is determined at runtime. The AS3 documentation for Function.apply and Function.call both indicate that the first[详细]
2023-04-01 04:43 分类:问答Calculate a delta from list
I have this list: ADD X ADD Y REMOVE Z ADD X NO ACTION Y I need of this results: ADD X NO ACTION Y REMOVE Z The rules to calculate the delta are these:[详细]
2023-04-01 00:57 分类:问答Hard to understand Haskell memory allocation behaviour
I stumbled upon Haskell and FP and got stunned by the possibilities. And the old maths nerd inside me had no trouble writing naive code for actual useful purposes. However inspite of all the reading I[详细]
2023-04-01 00:45 分类:问答Solving Equations in Haskell
I have to do an exercise and I´m pretty lost... I need to do an instance for Ord with polynomials. This is my try:[详细]
2023-03-31 18:55 分类:问答Can functional/immutable data structures still be useful for concurrency in a non-garbage collected context?
One of the selling points of immutable data structures is that they are automatically parallelizable.If no mutation is going on, then references to a functional data structure can be passed around bet[详细]
2023-03-31 18:15 分类:问答How to reduce Seq[Either[A,B]] to Either[A,Seq[B]]?
Given a sequence of eithers开发者_Python百科 Seq[Either[String,A]] with Left being an error message. I want to obtain an Either[String,Seq[A]] where I get a Right (which will be a Seq[A]), if all elem[详细]
2023-03-31 17:40 分类:问答Isn't Monad just a syntactic sugar?
I have been through various papers/articles/blogs and what not about Monads. People talk about them in various context like category theory (what in world is that?) etc. After going through all this a[详细]
2023-03-31 13:38 分类:问答