Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

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 ...
Enlico's user avatar
  • 531
3 votes
2 answers
194 views

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: ...
Lozminda's user avatar
  • 143
5 votes
3 answers
307 views

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 ...
tijko's user avatar
  • 782
8 votes
1 answer
145 views

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 ...
Peter's user avatar
  • 183
2 votes
0 answers
85 views

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 ...
WesAtWork's user avatar
  • 171
1 vote
1 answer
236 views

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 ...
Tsaras's user avatar
  • 157
4 votes
2 answers
774 views

I have this code, which is a pseudo-Sieve of Eratosthenes for generating primes: ...
Ari Fordsham's user avatar
5 votes
1 answer
184 views

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 ...
Arpad Horvath's user avatar
2 votes
1 answer
166 views

This is the No of Island code challenge. Please review my implementation in Haskell. I know there must be some better way of doing this. Given an m x n 2D binary grid grid which represents a map of '...
presci's user avatar
  • 259
2 votes
2 answers
131 views

I'm working on the famous clump finding problem to learn Haskell. Part of the problem involve breaking nucleotide sequences, called kmers, into subsequences as follows: ...
plaffont's user avatar
4 votes
1 answer
268 views

Two Sum Problem: Given an array of integers A and an integer K return True if there are two elements two elements xi, xj (i != j) such that xi + xj = K. Return False otherwise. I am implementing the ...
dpalma's user avatar
  • 165
0 votes
1 answer
161 views

Let's say you have a simple pure function that applies a discount of 30% if the total price of a list of Items is over 30.00 (let's not delve into the fact that I'm ...
Jir's user avatar
  • 201
2 votes
1 answer
108 views

Context Chapter 6 of Learn You A Haskell contains a function called chain, which outputs the Collatz sequence of a given input. (In short, it takes a natural number....
Jessica's user avatar
  • 910
2 votes
0 answers
117 views

I'm trying to use this library in my haskell program to generate a source map file, but getting some performance issue. The size of the mapping file generated was about 30M bytes, and it took almost ...
freedomhero's user avatar
2 votes
1 answer
163 views

Intro I have been learning haskell and functional programming using random Project Euler problems. Currently, I have solved Problem 11. What is the greatest product of four adjacent numbers in the ...
Naitik Mundra's user avatar
3 votes
1 answer
150 views

I've recently tried to write my functions by using composition. But this one, renderCross' is especially difficult to convert fully. How would I write this ...
ola_bandola's user avatar
3 votes
1 answer
181 views

I just finished a course of functional programming in uni and continued to study Haskell because I found it very interesting! I made a simple hangman game and would like to hear any of your thoughts ...
ola_bandola's user avatar
2 votes
1 answer
178 views

As a beginner exercise, I made small manual lexer that recognizes three types of inputs: integers: /[-]?[0-9]+/ strings, inside double quotes, with backslash ...
Pierre Arlaud's user avatar
1 vote
1 answer
112 views

I won't restate the problem in full, but in a nutshell you have to parse a file with a "direction" and a "magnitude", for instance: ...
Jir's user avatar
  • 201
3 votes
1 answer
163 views

I've tried to solve a challenge posted on a LinkedIn forum using Haskell - a language I'm still learning the basics of - and, while the code works correctly, I would like to get some feedback on the ...
Jir's user avatar
  • 201
5 votes
1 answer
353 views

I am currently studying an online course in Haskell and there are no "model examples" of the assignments after finishing them. I'm slowly getting the hang of this, but I'd like some feedback ...
Apelli's user avatar
  • 87
2 votes
0 answers
91 views

Is this a correct implementation in Haskell of a proof checker for first order logic with equality? I am most interested in if it is correct, and if the functions can be made clearer. I would like it ...
user695931's user avatar
2 votes
1 answer
97 views

I'm learning Haskell and even though I have experience with Functional Programming the Typesystem has been a challenge. I did this yesterday (after like 2 days) and I would like to know whether this ...
Aguxez's user avatar
  • 167
3 votes
1 answer
294 views

I'm trying to calculate perfect powers to solve this code wars challenge: https://www.codewars.com/kata/55f4e56315a375c1ed000159/haskell The number 81 has a special property, a certain power of the ...
jdkleuver's user avatar
8 votes
1 answer
616 views

There are already many Tic Tac Toe posts. But as far as I can tell, none of the ones in Haskell are complete with a GUI Here is my implementation with Gloss. Gist Link for convenience ...
Agnishom Chattopadhyay's user avatar

1
2 3 4 5
22