Reference/each

From Kx Wiki
Revision as of 08:49, 28 October 2009 by Chris Burke (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

each (each adverb)

The adverb each takes a function on its left, and creates a new function that applies to each item of its argument.

Syntax

q)function each arg

Example

q)count (1 2 3;"hello")
2
q)count each (1 2 3;"hello")
3 5

Remark

each is not used with verb arguments - for these use one of ' (eachboth), \: (eachleft) or /: (eachright), for example:

q)"xyz" ,' ("anne";"beth";"cindy")
"xanne"
"ybeth"
"zcindy"

See also


For a complete list of functions, see the kdb+ Function Reference.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox