|
|
|
|
|
by mhitza
1296 days ago
|
|
I know exactly what you mean. I'm going to try AoC this year again with Haskell, but this time around I'm just going to cheat and use it as an imperative language. {-# LANGUAGE BlockArguments #-}
{-# LANGUAGE Strict #-}
stateful s' f = runState f s'
forEach xs state' f = foldM f state' xs
solve input = forEach input initial_state $ \st current_value -> stateful st do
...
|
|