WIP on pseudo-code for #7 abstract function .

Need to run it by Valentin.