✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Using the combinator-based definitions for cons, head, and tail from the "Higher-Order Functions" chapter:
cons = x => y => f => f(x)(y)head = l => l(K) where K = x => y => xtail = l => l(K(I)) where I = x => x
What is the result of head(tail(cons(1)(cons(2)(null))))?