Skip to main content

Questions tagged [haskell]

A functional programming language

0 votes
0 answers
719 views

The traditional (Scheme, Pascal) way to structure code is this: declare outer function declare inner function body of inner function body of outer function The where clause in Haskell moves ...
ceving's user avatar
  • 401
1 vote
0 answers
70 views

I wrote a java call graph generator with tree sitter (the 3rd-party library in question)'s python binding. I am doing a thought experiment on how I might model the same application in Haskell. I am ...
Acy's user avatar
  • 111
1 vote
1 answer
346 views

I have recently given Haskell another go, mostly because I heard about the book Haskell from first principles and so far I'm having a blast. My background is that of a mathematician mostly working in ...
J. Becker's user avatar
  • 119
6 votes
1 answer
520 views

I'm writing a parser for a markup language in haskell, and a finite state machine fell out of my ideal API. I have code that looks a bit like this: Token = BoldWord String | Word String | ...
user avatar
31 votes
3 answers
6k views

I'm trying to understand whether the Haskell and C++ communities mean different things by the word "functor", or if there's some underlying concept that unifies the two meanings. My ...
Stephen Warren's user avatar
0 votes
2 answers
230 views

The Elm Guide says to use Maybe for partial functions, but I was under the impression that returning Maybe solves the problem of partial functions and makes them total. It gives a value from the ...
bcb's user avatar
  • 119
0 votes
1 answer
172 views

Would it be (mostly) correct to say that the following are the parallels to the Haskell Monad operations in the imperative world? Monad's >> ~ C/C++/JavaScript/etc. , operator do expressions ~ C/...
P Varga's user avatar
  • 339
9 votes
4 answers
4k views

I'm a .Net and Angular developer who's been working with OO languages throughout my education and work history. Lately I've been thinking about spending some time with one of the functional ...
human17's user avatar
  • 425
0 votes
1 answer
242 views

So, I was wondering about how Haskell's lists are implemented. I looked it up, and found this: data [] a = [] | a : [a] So I get that you can write lists like this if you want to: a:b:c:[] -- ...
InfiniteDonuts's user avatar
3 votes
3 answers
250 views

I am not sure if I ever clearly understood standard corollary "what to solve" and "how to solve" used to point out difference between functional (declarative) and imperative programming paradigm ...
rahulaga-msft's user avatar
-3 votes
2 answers
159 views

Let's say, that we keep track of students entering the auditorium using their IDs(Key) and their check-in time(Value) in a Map. We delete the entries once they move out of the auditorium. I want to ...
Vicky's user avatar
  • 399
6 votes
1 answer
752 views

AFAIK in Haskell it is heavily recommended to avoid partial functions; and if these seem unavoidable (eg head) then return a Maybe. At least, so the Haskell wiki says 1 2 What's the use of the ...
gaazkam's user avatar
  • 4,529
2 votes
1 answer
329 views

I'd like to hear some pros and cons about where it's best to put Haskell typeclass instances. I identify 2 possible cases and can not decide for myself which one is best: Put the instances together ...
Petras Purlys's user avatar
0 votes
3 answers
738 views

From what I gathered from learning Haskell, functional programming limits the amount of side effects, but in what ways? Hope someone can enlighten me on this one.
user3489985's user avatar
1 vote
4 answers
499 views

I'm sure this must have been asked before, but I can't find anywhere that actually answers my question, so apologies if I have simply overlooked this. I am currently learning Haskell, and loving the ...
Raiden616's user avatar
  • 141

15 30 50 per page
1
2 3 4 5
18