peter.murray.rust
peter.murray.rust

Reputation: 38063

How to use lambda in MathML

I'm using MathML as a compute engine and symbol manipulator and I'm interested in the power of the <lambda/> element. I'd appreciate examples of this being using for computation, or indeed any other uses

NOTE: @David_Carlisle refers to the discussion on the MathML list which deals with this very fully: http://lists.w3.org/Archives/Public/www-math/ and specifically the thread under: http://lists.w3.org/Archives/Public/www-math/2012Mar/0008.html

Upvotes: 0

Views: 675

Answers (1)

David Carlisle
David Carlisle

Reputation: 5652

Peter I think/hope you got answers you need on the www-math list, but a shame to leave mathml questions unanswered here for people searching the site later, so a classic use of lambda is to make an anonymous function that takes an argument and adds 1 to it. In classic lambda notation that would be

λ x. x +1

or in more usual mathematical function arrow notation

x ↦ x + 1

or in mathml

 <lambda><bvar><ci>x</ci></bvar>
   <apply><plus/><ci>x</ci><cn>1</cn></apply>
 </lambda>

Upvotes: 1

Related Questions