What are the algebras of the environment monad $-^E$ in $\mathbf{Set}$?
Abstractly, I see that an algebra of $-^E$ is a set $X$ with an operation $f : X^E \to X$ that obeys two laws: an "idempotence law", $f(x, x, …) = x$, and a "diagonal law" $$f(f(x^1_1, x^1_2, …), f(x^2_1, x^2_2, …), …) = f(x^1_1, x^2_2, …)$$ The free algebra is $X = Y^E$ with the diagonal function $f : Y^{E \times E} \to Y^E$. For any $X$, the $i$th projection is another example. That's all I've got so far.
Is there a more natural way to describe these things?
Edit. The environment monad ("Reader" for functional programmers) consists of the functor $A \mapsto A^E$, with the unit $\eta_A : A \to A^E$ given by constant functions, i.e. currying the projection $\pi_1 : A \times E \to A$, and the join $\mu_A : A^{E \times E} \to A^E$ given by composition with the diagonal function $\Delta : E \to E \times E$.
Also, I see now how to generalize my two examples a bit. Let $X = Y^A$ for some set $A$, and say $g : A \to A \times E$ commutes with the projection and diagonal: $$\pi_1 \circ g = 1_A$$ $$(1_A \times \Delta) \circ g = (g \times 1_E) \circ g$$ (Sorry, I don't know how to make diagrams here.) Then we can define $f : Y^{A \times E} \to Y^A$ by composition with $g$. The two examples I gave before are the special cases where $g = \Delta$ or $g : 1 \to 1 \times E$ picks out an element of $E$.