You're going to do my programming homework. Because want you to.
This is very simple... Work + No Spare Time = No Homework Done
So here's the deal: I supply to you my Java Homeworks and you'll do it.
If you're unable to do it, feel free to post whatever you like.
If you're a fucking coding god, you will post your ultimate solution, and face the criticism from other coding gods, including moot.
Cruel Leonidas demanded that you stand. I require only that you kneel.
data Position = Left | Right | Both
data Digit = Digit Bool Position Bool Position Bool
digit :: Int -> Digit
digit 0 = Digit True Both False Both True
digit 1 = Digit False Right False Right False
digit 2 = Digit True Right True Left True
digit 3 = Digit True Right True Right True
digit 4 = Digit False Both True Right False
digit 5 = Digit True Left True Right True
digit 6 = Digit True Left True Both True
digit 7 = Digit True Right False Right False
digit 8 = Digit True Both True Both True
digit 9 = Digit True Both True Right True
horiz :: Int -> Bool -> [String]
horiz n False = [replicate n ' ']
horiz n True = [replicate n '-']
vert :: Int -> Position -> [String]
vert n pos = replicate n $ vert' n pos
vert' n Left = "|" ++ replicate (n-1) ' '
vert' n Right = replicate (n-1) ' ' ++ "|"
vert' n Both = "|" ++ replicate (n-2) ' ' ++ "|"
showDigit :: Int -> Digit -> [String]
showDigit n (Digit t u m l b) =
hor t ++ ver u ++ hor m ++ ver l ++ hor b
where hor = horiz n
ver = vert n
showDigits :: Int -> [Int] -> String
showDigits n = concat .
map ((++ "\n") . concat . intersperse " ") .
transpose . map (showDigit n . digit)