Make Func a function rather than a struct

Update doc.
Move example to parent dir