func snippets