4 ms·
I guess the ending is supposed to be a joke, but because the piece never explains what | means, I couldn’t figure it out.
by raldi 5y ago
I guess the ending is supposed to be a joke, but because the piece never explains what | means, I couldn’t figure it out.
- galkk 5y agoI 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
- revolvingocelot 5y agoExactly. 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/technical/documents/kreflite.pdf http://web.archive.org/web/20050504070651/http://www.kx.com/...