Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 66037

A functional programming language

2
votes
) that are not guaranteed by the semantics. This library relies on a trick that depends in the precise way the Haskell compiler tracks which terms have been evaluated and which haven't in order to trick …
answered Jun 2 '17 by Jules
-1
votes
In a lazy language, it's much harder to evaluate an infinite list fully, unless you are using functions that are explicitly strict (eg seq or functions that are implemented using it, like foldl'). If …
answered Apr 27 '16 by Jules
3
votes
You could declare a typeclass for objects that know their location and shape, and create an instance for Object. Then your draw would accept any instance of that typeclass, but wouldn't be able to fi …
answered Jul 12 '16 by Jules
2
votes
I think the most interesting difference between the two, certainly from the perspective of a language designer, is that Haskell's error handling is not a language feature but is part of the library, a …
answered May 23 '16 by Jules
2
votes
Even if it had valid Haskell syntax, your PairMap "monad" isn't actually a monad, because it forces the result type of the bind operation to be a pair, which prevents the ability to use it in …
answered Jun 10 '16 by Jules
3
votes
Haskell is implemented, this can cause problems where files never get closed, so in Haskell it should only be used with care, but in principle the method is extremely helpful1. Implementing processes …
answered Sep 11 '18 by Jules
3
votes
they don't write a parser for their language (you write parse trees in Haskell to use it), but this would clearly be a very simple addition that could be based on a typical parsec tutorial. …
answered Jan 19 '16 by Jules
45
votes
arises. In lazy languages (e.g. Haskell), stopping early can be achieved simply by not evaluating any further along the list, which will cause additional values to never be generated. Therefore … , translating your example to Haskell, I would write it as: doSomeCalc :: [Int] -> Int doSomeCalc values = foldr1 combine values where combine v1 v2 | v1 == 10 = v1 | v1 == 150 = v1 …
answered Jan 3 '18 by Jules