using a func type instead of the Encoder interface

I made another version of your excelent example using a func type instead of the Encoder interface. 

I don't know for sure if this complicates or simplifies your didactic article :)