Questions tagged [haskell]
Haskell is a purely functional programming language, featuring static typing, lazy evaluation, and monadic effects. The primary implementation is GHC, a high-performance compiler with a runtime supporting many forms of parallelism and concurrency.
1,080 questions
0 votes
0 answers
52 views
Augment vi editing mode in haskeline by implementing the ; and , commands
haskeline is a reimplementation in haskell of the GNU Readline library (the one that by default allows you to delete the word you just typed on your shell's command line by pressing Ctrl+w, for ...
3 votes
2 answers
194 views
Pattern Finding In Lists of Strings (2d Char Array), Advent of Code Day 04 Solution
This is part 2 of Day 4 of 2024's AoC: The problem is as follows: It's an X-MAS puzzle in which you're supposed to find two MAS in the shape of an X. One way to achieve that is like this: ...
5 votes
3 answers
307 views
HackerRank, Haskell simple "compression" algorithm
The question asked is very straight-forward and is simple enough to solve. What I am looking for is that hopefully I can get some understanding for using the constructs and built-ins of the Haskell ...
8 votes
1 answer
145 views
Haskell 2-player TicTacToe terminal game
I want to get better at functional programming so I started with this simple 2-player TicTacToe game. Next I want to add a simple min-max algorithm to make it a 1-player game, but before that I'd like ...
2 votes
0 answers
85 views
Last Stone Weight Problem in Haskell Using `fold`
A previous solution of this code has been posted on Code Review before. This solution is more complicated then that one, but more performant (see the below) Why is this another Question instead of a ...
1 vote
1 answer
236 views
Haskell code optimization for short Pi approximator
Very new in Haskell, as a first easy program I went for an old algorithm of mine to approximate pi by counting points within a circle. The snippet below is what I could get working. I had quite an ...
4 votes
2 answers
774 views
Performance of Haskell prime sieve
I have this code, which is a pseudo-Sieve of Eratosthenes for generating primes: ...
5 votes
1 answer
184 views
Ackermann-Péter function call count using Writer monad
I'm quite new to Monads and I tried add function call counting to the Ackermann function code. The goal was simplicity, not performance. I want to have code review on the ...