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
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
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
I often find this pattern in Haskell code: options :: MVar OptionRecord options = unsafePerformIO $ newEmptyMVar
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
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
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
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
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.
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.