Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
91 views

Meta Collatz Sequence

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
  • 828
5 votes
1 answer
337 views

Validate Finnish IBANs

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
3 votes
2 answers
66 views

Insert value into multiple locations in a list

Code ...
cgoates's user avatar
  • 185
5 votes
1 answer
308 views

Two player random number guessing game

I've created a two-player number guessing game in Haskell. My main objective was to practice dealing with "state" in a purely functional language (such as player scores, whose turn it is, ...
cgoates's user avatar
  • 185
2 votes
1 answer
2k views

Simple Haskell Parser

I'm very new to haskell (I never used Monads, Functors and other things) and FP in general. I decided to write the simplest parser I possibly can with some expansion possibilities. (I have a general ...
somerandomdev49's user avatar
1 vote
1 answer
741 views

Poker Hand Evaluator in Haskell

The idea is to represent a hand as a list of cards and create a frequency mapping, which can then be used to identify what rank of hand you have and arrange your hand in a way that allows the Ord type ...
L292092's user avatar
  • 409
5 votes
2 answers
218 views

Removing OO style coding from Haskell

Having coded in Objected-Oriented style my entire programming career, it's hard to adapt to functional style fully. I implemented a simple Hangman game: ...
gust's user avatar
  • 375
1 vote
1 answer
132 views

Basic tic-tac-toe matrix in Haskell

Beginner functional programmer... (but not beginner programmer) Currently, I have the following code: ...
gust's user avatar
  • 375
5 votes
2 answers
266 views

Porting functional programming code to Linq

I am very new to C# programming, so for practice I thought I would try to port a simple haskell function over to Linq. From learn you a haskell, there is the following implementation of powerset: <...
YonedaIsLove's user avatar
10 votes
1 answer
798 views

Printing patterns in Haskell

Write a function Int -> Char -> Char -> [String] that will create the appropriate pattern. For example: ...
Caridorc's user avatar
  • 28k
4 votes
3 answers
253 views

Prime factorization of an integer

I have just started learning functional programming (Haskell) for fun after using imperative languages my whole life. I am looking for quick and simple tips from pros on how the particular code I just ...
Prof. Legolasov's user avatar
8 votes
4 answers
8k views

Print "n" number of "hello world"

I had come up with the following code: ...
Kavin Eswaramoorthy's user avatar
11 votes
4 answers
2k views

Am I thinking functionally in these simple Haskell functions?

I'm learning Haskell using the University of Pennsylvania's online materials. I'm a few lessons in and was looking for some feedback about whether I'm thinking functionally enough or porting over my ...
Garry Cairns's user avatar
4 votes
2 answers
2k views

Simple Haskell calculator, using Maybe for error handling

I'm reading through Write Yourself a Scheme after finishing going through Learn You a Haskell. I attempted one of the early exercises: writing a program to get an operator and two numbers and do a ...
lightandlight's user avatar
4 votes
1 answer
117 views

Counting items in categories

I'm an experienced programmer that also has a little experience with functional programming, although mostly theoretical (as in hobby-level reading and very minor projects). I recently decided to ...
Anders Arpi's user avatar

15 30 50 per page