I hereby claim:
- I am bisserlis on github.
- I am bisserlis (https://keybase.io/bisserlis) on keybase.
- I have a public key ASBIbaIllL9uSe8a3lrlBtIzlMz61L3JxYU4St4oiae24wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
[1 of 1] Compiling Elegant ( elegant.hs, elegant.o ) | |
==================== Tidy Core ==================== | |
Result size of Tidy Core = {terms: 20, types: 32, coercions: 0} | |
Elegant.filterByList1 | |
:: forall a_b. GHC.Types.Bool -> a_b -> [a_b] -> [a_b] | |
[GblId, | |
Arity=3, | |
Caf=NoCafRefs, |
module Integers where | |
data Nat = Zero | Succ Nat | |
deriving Show | |
data Z = Negative Nat | NonNegative Nat | |
deriving Show | |
plus :: Nat -> Nat -> Nat | |
Zero `plus` m = m |
-- From e-mail: | |
-- 1. You must use a 'recursive' function to prompt and check guesses. | |
-- 2. You should have a running tally of guesses. | |
-- 3. The program should be able to handle invalid numbers by increasing the guesses. | |
-- Optional: | |
-- 1. You can display a list of numbers to choose from and with each proper guess the list should remove the guessed number. | |
-- | |
-- Approximate effort: 4 minutes | |
import Data.List (delete) |