simple functional interpreter