Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/lang/functional/numrec.js

  • Provides:

    • dojox.lang.functional.numrec
  • Requires:

    • dojox.lang.functional.lambda in common
    • dojox.lang.functional.util in common
  • dojox.lang.functional

    • alias - dojox.lang.functional
  • dojox.lang.functional.inlineLambda

    • alias - dojox.lang.functional.inlineLambda
  • dojox.lang.functional.numrec

    • parameters:
      • then: (typeof Object)
        The value, which is used upon termination of the recursion.
        It will be returned as the value of the generated function.
        above:
        The lambda expression, which is called after the recursive step.
        It accepts two parameters: the returned value from the recursive step, and
        the original parameter. The returned value will be returned as the value of
        the generated function.
      • after: (typeof Function|String|Array)
    • summary
      Generates a function for the simplified numeric linear recursion pattern.
      All parameter functions are called in the context of "this" object.
    • description
      This is a simplification of the linear recursion combinator:
      - the generated function takes one numeric parameter "x",
      - the "cond" is fixed and checks for 0.
      - the "before" is fixed and the generated function is called with "x - 1".
      - the "above is called with two parameters: the return from the generated
      function, and with "x".
      - as you can see the recursion is done by decreasing the parameter,
      and calling itself until it reaches 0.
    • type
      Function
  • dojox.lang

    • type
      Object
  • dojox

    • type
      Object