Questions tagged [haskell]

This challenge is related to the Haskell language. Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
88 votes
58 answers
17k views

Tips for golfing in Haskell

What general tips do you have for golfing in Haskell? I am looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Haskell. Please post only one ...
Animesh 'the CODER''s user avatar
46 votes
34 answers
16k views

Wait, what language is this?

Recently I had the pleasure of writing a Haskell program that could detect if the NegativeLiterals extension was engaged. I came up with the following: ...
Wheat Wizard's user avatar
  • 98.5k
63 votes
85 answers
10k views

Sugar Free Syntax

In Haskell the list notation: [a,b,c] Is just syntactic sugar for: a:b:c:[] And the string notation: ...
Wheat Wizard's user avatar
  • 98.5k
18 votes
1 answer
1k views

How to golf a fork in Haskell?

I'm trying to make a pointfree function f that can act like APL's dyadic forks/Husk's §, so ...
user's user avatar
  • 327
10 votes
3 answers
633 views

Interpreted arithmetic

A little known fact is that if you turn on enough language extensions (ghc) Haskell becomes a dynamically typed interpreted language! For example the following program implements addition. ...
Wheat Wizard's user avatar
  • 98.5k