functional-programming
'some' and 'many' functions from the 'Alternative' type class [duplicate]
This question already has answers here: 开发者_Python百科 Haskell - What is Control.Applicative.Alternative good for?[详细]
2023-04-10 20:51 分类:问答Vowel datatype in Haskell, is it possible?
I have written the following code to remove vowels from a sentence: main = print $ unixname \"The House\"[详细]
2023-04-10 15:36 分类:问答Replacing the elements that meet special condition in List with Python in a functional way
I have a list [1, 2, 3, -100, 2, -100]. I need to replace -100 with \"ERROR\", and others to their corresponding string.[详细]
2023-04-10 15:26 分类:问答C# or JavaScript: Determining common prefix in strings [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Find common prefix of strings[详细]
2023-04-10 13:07 分类:问答Filter in functional languages with original non-filtered elements?
I want to return an array that that maps some filtered elements - but I want to keep the non-filtered elements where they are.[详细]
2023-04-10 09:41 分类:问答OCaml: Declaring a function before defining it
Is there a way to declare a function before defining it in OCaml?I\'m using an OCaml interpreter. I have two functions:[详细]
2023-04-10 08:26 分类:问答F# Group or aggregate a record sequence/collection by a given criteria
I am pretty new to functional programming and therefore F# and I have serious trouble to come up with the right solution for this problem.[详细]
2023-04-10 05:13 分类:问答OCaml: Does storing some values to be used later introduce "side effects"?
For a homework assignment, we\'ve been instructed to complete a task without introducing any \"side-effects\".I\'ve looked up \"side-effects\" on Wikipedia, and though I get that in theory it means \"[详细]
2023-04-09 10:59 分类:问答What are some approaches for gathering and conveying compiler errors
The simplest approach is just to throw an exception with error information at the first occurrence of an error. Perhaps another approach is to pass a mutable list argument through analysis functions.[详细]
2023-04-09 08:55 分类:问答Function Returns "No Solution" Instead Of "Nothing"
I have a standard datatype representing formulae of predicate logic. A function representing a natural deduction elimination rule for disjunction might look like:[详细]
2023-04-09 08:06 分类:问答