right

From The K Language Wiki
Revision as of 06:42, 9 July 2022 by Promovicz (talk | contribs) ("Better category ordering, add redirects to categories, fix pseudo-adverb categories")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Right
(:)

Right, a.k.a. dex (from Latin dexter), is a function that returns its rightmost argument.

 (:)[1;2]
2

When it accepts only one argument, it could be referred to as identity or identity function.

 (::)1
1

In some dialects the identity function could serve as a placeholder for missing indices in square-bracket indexing or for missing arguments in projections.