referential-transparency
Recursively modifying parts of a data structure in Haskell
Hello guys I am new to Haskell, I would like to create a Haskell Program that can apply DeMorgan\'s laws on logic expressions. The problem is I can\'t change the given expression to a new expression ([详细]
2023-03-09 08:35 分类:问答How to write a haskell function without IO in type sig by hiding 'state' changes
I wrote a function in haskell that takes a few parameters like Word32, String (ignore currying) and outputs IO Word32. Now, this is a function in the true sense: for the same inputs, the output will a[详细]
2023-03-07 13:46 分类:问答Referential transparency in OCaml
I\'m trying to reconcile the definition of referential transparency with how OCaml handles polymorphic types and side-effects. I read on https://web.archive.org/web/20120729232358/http://www.csc.villa[详细]
2023-03-07 12:05 分类:问答Is there a bidirectional multimap persistent data structure?
In other words, can we model many to many relationships in a persistent data structure efficiently? A pair of unidirectional multimaps was suggested. However, I\'m not sure how this would work well[详细]
2023-02-25 18:50 分类:问答Languages with immutable variables by default, like Haskell
one thing that I find fascinating about Haskell is how functions and variables are the same. In most languages a variable holds a value while a function does something and then, eventually, returns a[详细]
2023-02-25 14:04 分类:问答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 分类:问答Extending of pure function with IO code possible?
I\'ve written a simple XML parser in Haskell. The function convertXML recieves contents of a XML file and returns a list of extracted values that are further processed.[详细]
2023-02-02 16:48 分类:问答Is there processor/plugin out there that would enforce referential-transparency, immutabiliyt, etc. in Java?
It seems pretty straightforward: For example, an @Immutable on a class that the processor would then give error if there were any non-final field accesses. It would have to ensure that all collaborato[详细]
2023-01-30 23:51 分类:问答How do functional languages model side-effects?
Sinc开发者_开发技巧e side-effects break referential transparency, don\'t they go against the point of functional languages?There are two techniques that are used by purely functional programming langu[详细]
2023-01-19 00:50 分类:问答Why does laziness go well with referential transparency?
I was reading a Haskell tutorial (开发者_运维技巧Learn You a Haskell) in which the author said that laziness goes well with referential transparency. After more reading and some searching, I still don[详细]
2023-01-18 23:52 分类:问答