Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7678

Add functions 'all' and 'any'

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.1.0
    • Component/s: Functions, Language
    • Labels:
      None
    • Template:
    • Epic Link:
    • Sub-team:
    • Team:
      Platform Core
    • Story Points:
      2
    • Sprint:
      Language Triage, Agent 2017-06-28
    • Release Notes:
      New Feature
    • Release Notes Summary:
      Hide
      The functions {{any}} and {{all}} have been added to puppet. They iterate over something iterable and tests if there is at least one element for which a lambda returns a truthy value ({{any}}) or if the lambda returns a truthy value for all elements ({{all}}).
      Show
      The functions {{any}} and {{all}} have been added to puppet. They iterate over something iterable and tests if there is at least one element for which a lambda returns a truthy value ({{any}}) or if the lambda returns a truthy value for all elements ({{all}}).
    • QA Risk Assessment:
      Automate
    • QA Risk Assessment Reason:
      We should write tests for this language feature TestRail: C1000298

      Description

      The functions all and any are very useful to have as the alternative is to write a somewhat awkward reduce where lots of values are potentially skipped.

      The all and any should follow the puppet iterative function convention of one or two keys being the index/key and value.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              qa qa
              Reporter:
              henrik.lindberg Henrik Lindberg
              QA Contact:
              Eric Delaney
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support