← Back to context

Comment by RodgerTheGreat

2 years ago

As a moderately experienced K programmer, I find K easy enough to "scan". Common idioms immediately stand out as recognizable "words" that are suggestive of what a routine does before you fully parse it:

@& (filtering)

@< or @> (sorting)

@\: (folding)

,/ (flattening)

+\ (a running total)

etc.

It's also easy to notice, e.g. in K3, a reserved name like "_f" and immediately know you're looking at a recursive procedure.

In what sense is @\: folding? Doesn't it take a list of functions on the left and a thing on the right, and returns the list of values obtained by applying each function to the thing?