bf-repl/src/Main.hs

18 lines
354 B
Haskell
Raw Normal View History

2022-10-14 01:06:22 +02:00
module Main where
import Base
import Evaluate
import Formatter
import Text.Printf
import Data.String (fromString)
main :: IO ()
main = prettyPrintState' s
where
s :: State
s = foldl f initState [Increment, Increment, Increment, MoveRight, Increment]
f :: State -> BFAction -> State
f state action = fst (processAction state action)