Implementing recursive pascal method

Implemented as free text. Test it in IDE for syntax errors.