Implement definition and calling of generic functions