@alexandra scheme or relatives is a good choice however…
my personal opinion is that while functional programming concepts are good and extremely useful, they are good and useful only for a subset of problems that one might encounter when writing a program…
and more generalist languages have enough support for functional programming these days that they’re generally more pleasant to work with (unless your problems happen to be exclusively those that functional programming is good at).
definitely if your interest is just in transforming data, learn XSLT or Scheme!
otherwise, if you’re already familiar with Javascript, i’d recommend just doing functional stuff in Javascript+Deno… the caveat here is that the JS community is a mess, and it can be hard to get off on the right foot if you don’t already understand the language.
Swift is a very good programming language for functional programming in my experience. it’s probably my favourite language right now in general, although perhaps less because of its strengths and more because of the failings of the rest of them 😝.