 I've been wanting for a while to show that Ida supports quite a few concepts from functional programming even though it's not often regarded as a functional programming language. And there are a few reasons why I wouldn't consider it among the top tier functional programming languages. I could definitely think of some features something like Haskell has that Ida does not. But just like with the previous video I did on sets I do want to point out the features of functional programming that Ida has that really surprised a lot of people. And in doing this I actually found a feature that I did not know Ida supported. So this one I've already written out because I really was I was trying to push exactly how far I could go and I didn't know how long that would take or what kind of problems I would run into. What I have here is a list, a list of integers, and I want to return the list, a limited list of just the even numbers within that list by using a few features that functional programming has to offer. The one I'm going to get into now because I have a bug to fix in something else is that a higher order function can be given to a variable, a value. That is you can assign a value to the function similarly to defining a variable to the value itself. And you can see that here because this expression, the set expression, is not a valid function and Ida does not support lambdas. I can't just use this but I can give it a function name and signature. On that I can define e as an access because that's what all valued functions are, is an access to that function, a named access. We define an access to a function with the same signature and then assign it as an access to the function we just defined. So then any call to e is a call to is even. Unfortunately isn't super useful without lambdas. This would be really nice with lambdas although I do have some personal issues, personal gripes with lambdas and I think they actually discourage code reuse. I'm a pretty firm believer that if you need it once, you're going to need it more than once. That's not always true. That's why I say firm believer not devout fanatic. But in the majority of cases, anytime I've written something at least once I've wound up needing it later down the road, even if it's a few months or a year later I've wound up needing it again. That's why I write so many libraries. But then the rest of this, I know I'm talking about functional programming and then I use a loop. Should be using recursion or pure function stuff. But you can see inside the loop that I am calling the valued function, the named function. And if we run this, it does work. The list we started with was 1, 2, 3, 4, 5 and it did return all of the even numbers in a new list. So this does work. The thing I got to show next, and like I said, I have a bug to fix. It got caught in an infinite loop so it should be a pretty easy bug to fix. Was that this really, ideally you would want to do this in a WHERE query. Pass the valued function straight into the WHERE query. Because then you don't even have to do the looping. But for now you can see that one of the big points of higher order functions is present in AIDA. But in the typical AIDA fashion it is very verbose type definitions. AIDA takes type safety way stronger than most functional programming languages. But it does support that.