{"id":7385,"date":"2019-07-31T11:00:47","date_gmt":"2019-07-31T11:00:47","guid":{"rendered":"https:\/\/www.version1.com\/en-us\/?p=7385"},"modified":"2019-07-31T11:00:47","modified_gmt":"2019-07-31T11:00:47","slug":"kdb-iterators-for-beginners","status":"publish","type":"post","link":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/","title":{"rendered":"kdb+: Iterators for Beginners&#8217;"},"content":{"rendered":"We\u2019ve had several requests for a blog on kdb+ iterators, so here it is. I was part of a team of developers who were given the opportunity to learn kdb+ and one of the challenges that we faced was learning to think in terms of vectors and lists, instead of loops.\n\nIterators in kdb+ (recently re-coined from \u201cadverbs\u201d) allow programmers to modify the behaviour of functions in order to gain the desired effect of looping. At first, this may be startling to a programmer who is used to traditional programming languages, but when kdb+ iterators are mastered they yield cleaner, more efficient and less error prone code.\n\nAs Jeff Borror says in \u201cQ for Mortals\u201d \u2013 \u201cProficiency in the use of iterators is one skill that separates q pretenders from q contenders\u201d. Coming from a java background, here\u2019s a simple cheat sheet that helped me get my head around this.\n\nIt should be noted that <a href=\"https:\/\/www.version1.com\/sectors\/our-financial-services-expertise\/kdb-services-and-support-teams\/\">kdb+<\/a> does provide the \u201cdo\u201d and \u201cwhile\u201d functions as part of the language which emulate a traditional \u201cfor\u201d and \u201cwhile\u201d loop respectively but, once you gain a decent understanding of iterators, they should rarely (if ever) be needed. It is also worth noting that the \u201ctraditional\u201d languages are moving more towards functional style programming, such as Java\u2019s stream library introduced in Java 8.\n<h2>Each<\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/Picture1-1.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li>apply a function to each element in a collection\/list<\/li>\n<\/ul>\n<ul>\n \t<li>like \u201cforeach\u201d loop\u00a0in other languages<\/li>\n \t<li>apply a function to multiple collections of arguments<\/li>\n<\/ul>\nIn the example below we want to find out the average of each list of prices.\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/each-1.png\" alt=\"\" loading=\"lazy\">\n<h2>Each-both (\u2018)<\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/Picture-7-1.png\" alt=\"\" loading=\"lazy\">\n\nThe example below shows how to join a list of symbols in one list with a corresponding price in another list, to create a simple matrix of two lists.\n\n<code>q)tickerSyms:`APPL`AMZN`GOOG`MSFT\nq)prices:116.85 3221.66 1556.0 208.64\nq)tickerSyms,'prices\n`APPL 116.85\n`AMZN 3221.66\n`GOOG 1556f\n`MSFT 208.64<\/code>\n\nNOTE: You can also use the formal syntax below, but they do the same thing:\n<code>q),'[tickerSyms;prices]\n`APPL 116.85\n`AMZN 3221.66\n`GOOG 1556f\n`MSFT 208.64\n<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/eachBoth-1.png\" alt=\"\" loading=\"lazy\">\n\nThe count of <em>x <\/em>and <em>y <\/em>must be equal, or you will get a <em>\u2018length<\/em> error. Alternatively, <em>x<\/em> or <em>y<\/em> can be supplied as an atom (single-element) and this will be extended to match the length of the opposing argument.\n<h2>Each-prior (\u2018:)<\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/3-1.png\" alt=\"\" loading=\"lazy\">\n<ul>\n \t<li>allows the\u00a0interpreter\u00a0to\u00a0look back at the previous element in the list<\/li>\n \t<li>used with functions that take two arguments, with <em>x<\/em> being the \u201ccurrent\u201d value and <em>y<\/em> being the \u201cprevious\u201d<\/li>\n<\/ul>\nThe example below uses each prior to compute the percentage change between a list of prices.\n\n<code>q)prices:103.2 103.21 103.22 103.15 102.15 101.95\nq)P 2 \/\/ Set display precision to 2 s.f.\nq){100*(x-y)%y}':[prices]\n0n 0.0097 0.0097 -0.068 -0.97 -0.2<\/code>\n\nNOTE: <em>x <\/em>value will always be null on the first pass as there is no previous element in the list.\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/eachPrior.png\" alt=\"\" loading=\"lazy\">\n<h2>Over (\/) and Scan ()<\/h2>\nScan and Over modify functions to make them cumulative (i.e. the result of an iteration is passed forward to the next).\n<ul>\n \t<li>Both work in the same way, but their output results differ:\n<ul>\n \t<li>Scan: returns result of each iteration<\/li>\n \t<li>Over: returns final result only<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n \t<li>Both behave slightly differently depending on the inputs supplied<\/li>\n<\/ul>\n<h2><strong>Over (\/) and Scan () \u2013 Single-argument Functions<\/strong><\/h2>\n&nbsp;\n<h3><strong>For\/Do<\/strong><\/h3>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/5.png\" alt=\"\" loading=\"lazy\">\n\nIn the Fibonacci example below the initial input is a list (0, 1). The function sums the last 2 elements of the list and appends it to the end of the list. The new list is used as the input in the next iteration, this is repeated 6 more times. The scan example below returns the result of each iteration, making it easier to see what the iterator is doing, this can be helpful when debugging.\n\n<code>q){x,sum -2#x}[7;0 1]\n0 1\n0 1 1\n0 1 1 2\n0 1 1 2 3\n0 1 1 2 3 5\n0 1 1 2 3 5 8\n0 1 1 2 3 5 8 13\n0 1 1 2 3 5 8 13 21<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/fib.png\" alt=\"\" loading=\"lazy\">\n\nWhen using <em>over <\/em> only the result of the final iteration is returned.\n\n<code>q){x,sum -2#x}\/[7;0 1]\n0 1 1 2 3 5 8 13 21<\/code>\n<h3><strong>While<\/strong><\/h3>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/6-1.png\" alt=\"\" loading=\"lazy\">\n\nIn the example below an initial value of 1 is passed into a function that triples the input. The function will repeat, passing the result onto the next iteration as long as the \u201cwhile_condition\u201d is true. The <em>scan <\/em>example below shows each intermediary.\n\n<code>q){x*3}[{x&lt;15};1]\n1 3 9 27<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/Picture21.png\" alt=\"\" loading=\"lazy\">\n\nAgain, using <em>over<\/em> will only return the result of the final iteration.\n\n<code>q){x*3}\/[{x&lt;15};1]\n27<\/code>\n<h3><strong>Converge<\/strong><\/h3>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/8.png\" alt=\"\" loading=\"lazy\">\n\nIf the number of iterations or a condition is not supplied,\u00a0the\u00a0function will repeat until the result converges. In other\u00a0words,\u00a0the function will run\u00a0using the output of the previous iteration\u00a0until the \u2018x\u2019 value repeats itself.\u00a0 Below example shows a multi-level nested list in kdb+, we can use over <em>(\/) <\/em>in conjunction with <em>raze<\/em> to converge on a flat list.\n\n<code>q)nestedList:(1;(2;(3;4;5));(6;7);8;enlist 9)\nq)nestedList\n1\n(2;3 4 5)\n6 7\n8\n,9\nq)raze nestedList\n1\n2\n3 4 5\n6\n7\n8\n9\nq)raze raze nestedList\n1 2 3 4 5 6 7 8 9\nq)raze\/[nestedList]\n1 2 3 4 5 6 7 8 9\nq)raze\/[nestedList]~raze raze nestedList\n1b<\/code>\n\nBut instead of having to use \u201craze\u201d multiple times to flatten the nested list, we can instead use raze combined with \/.\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/converge2.png\" alt=\"\" loading=\"lazy\">\n\nRaze will keep executing until it has flattened the entire nested structure. In this example it will be execute 3 times but with complex data it can execute many times more.\n\n<code>q)megaNestedList:(1;(2;(3;(4;(5;(6;(7;(8;(9;(10))))))))));\nq)raze\/[megaNestedList]\n1 2 3 4 5 6 7 8 9 10\n<\/code>\n<h2><strong>Over (\/) and Scan () \u2013 Multi-parameter\u00a0Functions<\/strong><\/h2>\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/9.png\" alt=\"\" loading=\"lazy\">\n\nWhen using the Scan\/Over iterators with functions that accept multiple arguments, the iterator behaves slightly different than with single-argument functions.\u00a0I would describe this as\u00a0similar to\u00a0foreach in other languages, where an initial seed value is provided.\n\nThe initial value of 0 is passed to\u00a0the function as <em>x<\/em>, and the first element\u00a0of the list is used as\u00a0<em>y<\/em>. The result is passed forward to the next iteration as the <em>x <\/em>value, and the next <em>y <\/em>value in the list is used and so on. See each intermediate result using the scan iterator below:\n\n<code>q){x+y}[0;1 2 3 4]\n1 3 6 10<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/scan.png\" alt=\"\" loading=\"lazy\">\n\nFor the same example using <em>over <\/em>instead, we get the final result only:\n\n<code>q){x+y}\/[0;1 2 3 4]\n10<\/code>\n\nSame idea is true for functions with more arguments:\n\nIn this example of <em>scan\/over <\/em>we can see the atomic z argument provided being extrapolated throughout each iteration, similar to previous explained with each-both.\n\n<code>q){x+y+z}[5 6;1 2 3;10]\n16 17\n28 29\n41 42<\/code>\n\n<code>q){x+y+z}\/[5 6;1 2 3;10]\n41 42<\/code>\n\n<img decoding=\"async\" src=\"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/06\/over.png\" alt=\"\" loading=\"lazy\">\n\nNOTE: <em>z<\/em> argument in this example is extended to the same depth of the largest collection <em>(y) <\/em>\u2013 this only happens when passing an atom\/scalar.\n\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve had several requests for a blog on kdb+ iterators, so here it is. I was part of a team of developers who were given the opportunity to learn kdb+ and one of the challenges that we faced was learning to think in terms of vectors and lists, instead of loops. Iterators in kdb+ (recently [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":7386,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[101],"tags":[],"industry":[],"class_list":["post-7385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"translations":[{"blog_id":1,"post_id":7385,"name":"Europe","code":"EN-GB","hreflang":"en-gb","url":"https:\/\/www.version1.com\/blog\/kdb-iterators-for-beginners\/","is_current":false},{"blog_id":13,"post_id":7385,"name":"Americas","code":"EN-US","hreflang":"en-us","url":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/","is_current":true}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>kdb+: Iterators for Beginners&#039; | Version 1 (US)<\/title>\n<meta name=\"description\" content=\"In the latest of our \u2018kdb+ guides for Beginners series, we present a blog which discusses kdb+ iterators.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"kdb+: Iterators for Beginners&#039; | Version 1 (US)\" \/>\n<meta property=\"og:description\" content=\"In the latest of our \u2018kdb+ guides for Beginners series, we present a blog which discusses kdb+ iterators.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Version 1 (US)\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-31T11:00:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2019\/07\/meeting-594091_1920.png.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"kdb+: Iterators for Beginners&#8217;\",\"datePublished\":\"2019-07-31T11:00:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/\"},\"wordCount\":908,\"publisher\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/meeting-594091_1920.png.webp\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/\",\"name\":\"kdb+: Iterators for Beginners' | Version 1 (US)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/meeting-594091_1920.png.webp\",\"datePublished\":\"2019-07-31T11:00:47+00:00\",\"description\":\"In the latest of our \u2018kdb+ guides for Beginners series, we present a blog which discusses kdb+ iterators.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/meeting-594091_1920.png.webp\",\"contentUrl\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/meeting-594091_1920.png.webp\",\"width\":680,\"height\":440,\"caption\":\"people sat at table with books and laptops\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/blog\\\/kdb-iterators-for-beginners\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"kdb+: Iterators for Beginners&#8217;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#website\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/\",\"name\":\"Version 1\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#organization\",\"name\":\"Version 1\",\"url\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.version1.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/cropped-cropped-Favicon-2.png\",\"contentUrl\":\"https:\\\/\\\/www.version1.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/cropped-cropped-Favicon-2.png\",\"width\":512,\"height\":512,\"caption\":\"Version 1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.version1.com\\\/en-us\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"kdb+: Iterators for Beginners' | Version 1 (US)","description":"In the latest of our \u2018kdb+ guides for Beginners series, we present a blog which discusses kdb+ iterators.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/","og_locale":"en_US","og_type":"article","og_title":"kdb+: Iterators for Beginners' | Version 1 (US)","og_description":"In the latest of our \u2018kdb+ guides for Beginners series, we present a blog which discusses kdb+ iterators.","og_url":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/","og_site_name":"Version 1 (US)","article_published_time":"2019-07-31T11:00:47+00:00","og_image":[{"width":680,"height":440,"url":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2019\/07\/meeting-594091_1920.png.webp","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#article","isPartOf":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/"},"author":{"name":"","@id":""},"headline":"kdb+: Iterators for Beginners&#8217;","datePublished":"2019-07-31T11:00:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/"},"wordCount":908,"publisher":{"@id":"https:\/\/www.version1.com\/en-us\/#organization"},"image":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2019\/07\/meeting-594091_1920.png.webp","articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/","url":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/","name":"kdb+: Iterators for Beginners' | Version 1 (US)","isPartOf":{"@id":"https:\/\/www.version1.com\/en-us\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2019\/07\/meeting-594091_1920.png.webp","datePublished":"2019-07-31T11:00:47+00:00","description":"In the latest of our \u2018kdb+ guides for Beginners series, we present a blog which discusses kdb+ iterators.","breadcrumb":{"@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#primaryimage","url":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2019\/07\/meeting-594091_1920.png.webp","contentUrl":"https:\/\/www.version1.com\/en-us\/wp-content\/uploads\/2019\/07\/meeting-594091_1920.png.webp","width":680,"height":440,"caption":"people sat at table with books and laptops"},{"@type":"BreadcrumbList","@id":"https:\/\/www.version1.com\/en-us\/blog\/kdb-iterators-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.version1.com\/en-us\/"},{"@type":"ListItem","position":2,"name":"kdb+: Iterators for Beginners&#8217;"}]},{"@type":"WebSite","@id":"https:\/\/www.version1.com\/en-us\/#website","url":"https:\/\/www.version1.com\/en-us\/","name":"Version 1","description":"","publisher":{"@id":"https:\/\/www.version1.com\/en-us\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.version1.com\/en-us\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.version1.com\/en-us\/#organization","name":"Version 1","url":"https:\/\/www.version1.com\/en-us\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.version1.com\/en-us\/#\/schema\/logo\/image\/","url":"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/05\/cropped-cropped-Favicon-2.png","contentUrl":"https:\/\/www.version1.com\/wp-content\/uploads\/2026\/05\/cropped-cropped-Favicon-2.png","width":512,"height":512,"caption":"Version 1"},"image":{"@id":"https:\/\/www.version1.com\/en-us\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/posts\/7385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/comments?post=7385"}],"version-history":[{"count":0,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/posts\/7385\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/media\/7386"}],"wp:attachment":[{"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/media?parent=7385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/categories?post=7385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/tags?post=7385"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.version1.com\/en-us\/wp-json\/wp\/v2\/industry?post=7385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}