purely-functional
A Functional-Imperative Hybrid
Pure functional programming languages do not allow mutable data, but some computations are more naturally/intuitively expressed in an imperative way -- or an imperative version of an algorithm may be[详细]
2023-03-28 13:41 分类:问答type of a function in D
I\'m interested in creating a function Derivative that returns a 开发者_开发问答function that is the derivative of some function that is passed to it, at some point.However, I want to be able to speci[详细]
2023-03-23 00:20 分类:问答F# PurelyFunctionalDataStructures WeightBiasedLeftistHeap ex 3.4
I\'m working on Okasaki\'s Purely Functional Data Structures and trying to build F# implementations of things. I\'m also going through the exercises listed in the book (some are pretty challenging). W[详细]
2023-03-12 20:40 分类:问答A way to avoid a common use of unsafePerformIO
I often find this pattern in Haskell code: options :: MVar OptionRecord options = unsafePerformIO $ newEmptyMVar[详细]
2023-03-07 03:31 分类:问答Do purely functional languages really guarantee immutability?
In a purely functional language, couldn\'t one still define an \"assignment\" operator, say, \"<-\", such that the command, say, \"i <- 3\", instead of directly assigning the immutable variable[详细]
2023-02-23 13:44 分类:问答Purity vs Referential transparency
The terms do appear to bedefined differently, but I\'ve always thought of one implying the other; I can\'t think of any case when an expression is referentially transparent but not pure, or vice-versa[详细]
2023-02-07 18:48 分类:问答Purely functional equivalent of weakhashmap?
Weak hash tables like Java\'s weak hash map use weak references to track the collection of unreachable keys by the garbage collector and remove bindings with that key from the collection. Weak hash ta[详细]
2023-02-05 15:33 分类:问答What is the benefit of purely functional data structure?
There are large number of texts on data structures, and libraries of data structures code开发者_JS百科. I understand that purely functional data structure is easier to reason about. However I have tro[详细]
2023-01-29 23:06 分类:问答Purely functional concurrent skip list
Skip li开发者_开发问答sts (Pugh, 1990) provide sorted dictionaries with logarithmic-time operations like search trees but skip lists are much more amenable to concurrent updates.[详细]
2023-01-12 04:20 分类:问答Clojure: working with a java.util.HashMap in an idiomatic Clojure fashion
I have a java.util.HashMap object m (a return value from a call to Java code) and I\'d like to get a new map with an additional key-value pair.[详细]
2022-12-09 22:21 分类:问答