« first day (61 days earlier)
← previous day
next day →
last day (1474 days later) »
chrispsn
12:45
@AlexanderBelopolsky can an anonymous function call itself recursively in k7?
Alexander Belopolsky
13:05
@chrispsn I think it’s nyi at the moment. Why don’t you ask on the googlegroup?
chrispsn
13:17
@AlexanderBelopolsky Done
Alexander Belopolsky
It looks like
r:{[f;a;x]$[x~*a;a 1;f[0][x;r[f;a]f[1]x]]}
in the log shows how to call f recursively.
r[{..}] ..
not sure how to make it work though.
chrispsn
@AlexanderBelopolsky Right. I had assumed it was showing how to call a named function recursively
calling a named function recursively seems to work
k7contrib.gitlab.io/docs/#func
ngn
13:46
@chrispsn there's the y combinator :)
chrispsn
@ngn never got my head around that one...
ngn
14:03
Y:{x x}{x{x[x]y}y}@; Y[{[f;x] $[x;x*f x-1;1]}]5
Y[f]
makes
f
pass itself as its own first arg
chrispsn
@ngn how good are implicit args! Reading that makes it much more understandable
6 hours later…
ktye
20:03
wasn't there "o" in some version of k for a self call?
chrispsn
20:47
@ktye oK has that, and they used to have .z.f in k7
ktye
@chrispsn i use o for self call with lexical scope and ∇ for tail call: github.com/ktye/i/blob/master/e.go#L96
1 hour later…
chrispsn
21:58
@ktye why ∇? does that symbol have that meaning in general use?
2 hours later…
juanez
23:29
.z.s you mean ? .z.f is file argument in k7 (and k4)
turns out, .z.s is now 'seconds' in k7..
chrispsn
23:47
@juanez it definitely used to be .z.f in k7. See an old iteration of \h here:
reddit.com/r/apljk/comments/b1l5hi/comment/…
juanez
gotcha
juanez
23:59
hmm, are the google-group messageboard posts being screened before publishing?
« first day (61 days earlier)
← previous day
next day →
last day (1474 days later) »
all rooms
Transcript for
May
7
May '19
8
May
9
the k tree
app.element.io/#/room/#ngnk:matrix.org
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2025 Stack Exchange Inc;
legal
mobile