Hacker News new | ask | show | jobs
by galkk 1772 days ago
I guess it means "max" or something like that (comparison operation?), and |/ means "max of an array".

Author builds this up by showing how long is writing "max" function with other approaches (iteration, reduce).

Can be wrong though

1 comments

Exactly. From the K2 manual [0] referred to in the article, |/ is "Max-Over". The ostensibly-unreadable K manages in two characters what the article's subject and coworker need either three lines of boring loop or one line of a more cognitively-demanding lambda to accomplish.

...FWIW my understanding of the language is such that I would have suspected the last line of the article to read "|/ list". I thought Max-Over needed an argument.

[0] pg36, http://web.archive.org/web/20050504070651/http://www.kx.com/...