Hacker News new | past | comments | ask | show | jobs | submit login

I guess the ending is supposed to be a joke, but because the piece never explains what | means, I couldn’t figure it out.



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


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/...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: