defineVal :: Env -> Index -> AtomoVal -> IOThrowsError AtomoVal
defineVal e n v = do val <- liftIO $ newIORef v
                     env <- liftIO $ readIORef (head e)
                     liftIO $ writeIORef (head e) ((n, val) : env)
                     return v
defineVal :: Env -> Index -> AtomoVal -> IOThrowsError AtomoVal
defineVal e n v = do val <- liftIO $ newIORef v
                     env <- liftIO $ readIORef (head e)
                     liftIO $ writeIORef (head e) ((n, val) : env)
                     return v
defineVal e n v = do val <- liftIO $ newIORef v
                     env <- liftIO $ readIORef (head e)
                     liftIO $ writeIORef (head e) ((n, val) : env)
                     return v