Question about Lambdas

Options
Hello! I've been following the Lambda announcement, and it seems like a very cool new feature. However, I feel I'm not *quite* wrapping my mind around the exact use-cases for when to use them.

For example, in the docs it's made very clear that lambdas can access and do all the same things as you can within the function stack. So my main question is - what is the point of using lambdas? Is it more for code refactoring & speed? 

And my 2nd question is, would anybody be able to spell out a specific use-case (even if it's very simple) for where you would choose to use a lambda as opposed to the normal function stack? An example use-case, along with your thought process on the "why" aspect, would be super helpful!

Thanks!

Comments

  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
    Hey ,

    Lambdas are just another tool in your toolbox to help you accomplish what you need to do in your function stack. Xano has a ton of built in statements and filters that get the job done, but every once in awhile there may be something that is a bit tricky to do and Lambdas may be able to make that easier. For example if you had a math formula that was very complex and took about 30 steps to calculate, then that would definitely be easier in a Lambda.

    Michael is going to be sending out an example video later today on this topic. I'll make sure to reference it here once its published.
  • Justin C
    Justin C Member
    Options
     got it - thank you!