Find Related products on Amazon

Shop on Amazon

Silly job interview questions in Haskell

Published on: 2025-06-25 10:27:27

Today I thought it'd be fun to take a look at a few common & simple "interview questions" in Haskell. These sorts of questions are often used to establish whether someone has programming and problem solving skills, and I thought it might be useful for folks to see how they play out in Haskell since our beloved language's solutions tend to follow a different paradigm than most other languages do. I'll withhold any judgement on whether these questions are in any way helpful in determining programming skill whatsoever 😅; please don't @ me about it. Palindromes Let's start off nice and easy with the standard "is it a palindrome" question! The task is to write a function which determines whether a given string is a palindrome (i.e. whether it reads the same in both reverse and forwards) isPalindrome :: String -> Bool = str == reverse str isPalindrome strstrstr >>> isPalindrome "racecar" isPalindrome True >>> isPalindrome "hello world!" isPalindrome False That'll do it! Not much to say a ... Read full article.