Is XSLT a functional programming language?

后端 未结 6 1602
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 02:02

Several questions about functional programming languages have got me thinking about whether XSLT is a functional programming language. If not, what features are missing? Has

6条回答
  •  不思量自难忘°
    2020-12-14 02:30

    That is not really an argument, since you can only declare variables, not change their values after declaration. In that sense it is declarative not imperative style, as stated in Mr Novatchev's article.

    Functional programming languages like Scheme or Erlang enable you to declare variables as well, and in Haskell you can also do that:

    -- function 'test' takes variable x and adds it on every element of list xs

    test :: [Int] -> [Int]
    test xs = map (+ x) xs
    where x = 2
    

提交回复
热议问题