code for Fibonacci series in Appian

How to create a code for Fibonacci series in Appian

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    TEST_AddValueToLastInList(list, value):
    append(ri!list, reverse(ri!list)[1] + reverse(ri!list)[2]),
    
    reduce(
      rule!TEST_AddValueToLastInList(list:_, value:_),
      {0, 1},
      enumerate(30)
    )

    {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269}

Reply
  • 0
    Certified Lead Developer

    TEST_AddValueToLastInList(list, value):
    append(ri!list, reverse(ri!list)[1] + reverse(ri!list)[2]),
    
    reduce(
      rule!TEST_AddValueToLastInList(list:_, value:_),
      {0, 1},
      enumerate(30)
    )

    {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269}

Children