RosettaCodeData/Task/Y-combinator/J/y-combinator-3.j
2025-06-11 20:16:52 -04:00

4 lines
186 B
Text

Y =. ]:&>/]:^:_1 b.]:`(<'0';_1)`:6&([ 128!:2 ,&<)
sr =. [ apply f. ,&< NB. Self referring
fac=. 1:`(] * [ sr ] - 1:)@.(0 < ])
fib=. (([ sr ] - 2:) + [ sr ] - 1:)^:(1 < ])