Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
44 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 ...
Enlico's user avatar
  • 531
5 votes
1 answer
479 views

How to implement an AVL tree efficient enough in Haskell?

upd: I am very sorry about my mistake. The old version of data is download from luogu, but the website do NOT allow me to download the data of the worst case. In fact, when facing same amount of ...
Haowen Shi's user avatar
3 votes
2 answers
173 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: ...
Lozminda's user avatar
  • 143
1 vote
0 answers
84 views

Value-level proofs of type-level membership and subset relations in Haskell

As part of a larger project, we're using type-level strings to identify "parties" (synonymously, "locations"). Critical to the system is the ability to express and enforce ...
ShapeOfMatter's user avatar
5 votes
3 answers
274 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 ...
tijko's user avatar
  • 782
4 votes
1 answer
94 views

Scraping the calendar of some public libraries from their websites

I've been learning some Haskell as an amateur (to be precise: I started programming with this language, and it has been a year or less since I started seriously). So far, I have realised only small ...
user665110's user avatar
8 votes
1 answer
138 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 ...
Peter's user avatar
  • 183
3 votes
1 answer
99 views

Parse 2D Cartesian coordinates and output their Polar form

The following code parses a 2D Cartesian coordinate passed as Cart2Pol <x> <y> and prints the coordinate in ...
Miles's user avatar
  • 133
2 votes
0 answers
77 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 ...
WesAtWork's user avatar
  • 171
4 votes
1 answer
202 views

Last Stone Weight Problem in Haskell using list `insert`

Background Saw this problem on TheJobOverflow which seems to be a LeetCode question. It bothered me that the "challenge" of this problem was to recognize the need for a specific data-type (...
WesAtWork's user avatar
  • 171
1 vote
1 answer
223 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 ...
Tsaras's user avatar
  • 157
4 votes
1 answer
128 views

Autocomplete system with prefix tree

I am quite new to Haskell, and this problem is from dailycodingproblem.com: Implement an autocomplete system. That is, given a query string s and a set of all ...
Fin H's user avatar
  • 43
4 votes
2 answers
752 views

Performance of Haskell prime sieve

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

Solve a letter digit substitution game in Haskell

I am working on a Haskell problem from exercism, which is a learn-to-code website. The problem statement is as follows. Write a function to solve alphametics puzzles. Alphametics is a puzzle where ...
Brendan Langfield's user avatar
5 votes
1 answer
171 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 ...
Arpad Horvath's user avatar

15 30 50 per page
1
2 3 4 5
72
Morty Proxy This is a proxified and sanitized view of the page, visit original site.