Skip to content

Pattern: PFunc

Returns the value generated by a function.

Useful to incorporate additional logic into a pattern.

Example output

>>> seconds = PFunc(lambda: datetime.datetime.now().second)
>>> p.nextn(16)
[19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19]