Skip to content

Instantly share code, notes, and snippets.

@ardwalker
ardwalker / speller.hs
Created September 23, 2019 08:57
Simple speller
import Debug.Trace
-- RULES
-- speller ["abacus"] -- > "a is for abacus"
-- speller [] -- > ""
-- speller ["apple", "banana", "coconut"]
-- -- > "a is for apple, b is for banana, and c is for coconut"
-- speller ["whisky", "x-ray"]
-- -- > "w is for whisky, and x is for x-ray"
import System.Random
import Data.Char
import Text.Printf
import Debug.Trace
-- <number-to-guess> <display-string> <character-guessed>
-- Returns: (Guessed correctly T/F , display-string)
check :: Int -> String -> Char -> (Bool,String)
check number display c =
@ardwalker
ardwalker / keybase.md
Created July 30, 2019 21:00
keybase.md

Keybase proof

I hereby claim:

  • I am ardwalker on github.
  • I am ardwalker (https://keybase.io/ardwalker) on keybase.
  • I have a public key ASDdDOFtXcMYRKSjSWaPv48i6fOZ9gktMApkZZli-5RRNAo

To claim this, I am signing this object: