I was recently writing some Haskell pseudocode while thinking on a problem, then I copied it into a Haskell file to make it compilable and it turned out it was already compilable. You don't need to memorize anything if your lang allows you to express your thoughts directly.