Skip to content

Instantly share code, notes, and snippets.

@xquery
Created December 17, 2013 08:38
Show Gist options
  • Save xquery/8001858 to your computer and use it in GitHub Desktop.
Save xquery/8001858 to your computer and use it in GitHub Desktop.
lexical closure in xquery 3 - see how the inline function 'sees' the variable $b ... neat right ?
let $b := 2
return
map(function($x) { $x * $x * $b }, 1 to 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment