Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Let $\newcommand{\o}{\omega}\o$ be the set of non-negative integers, and for any set $X$, let $\newcommand{\oo}{[\o]^{<\o}}X^{<\o}$ denote the collection of all finite subsets of $X$.
What is an example of a function $f:\oo\to\{0,1\}$ with the following property?
Whenever $X\subseteq \o$ is infinite, then the restriction $f|_{X^{<\o}}:X^{<\o}\to \{0,1\}$ is non-constant.