importClass(Packages.plugins.ylemontag.mathoperations.functors.Functor2)
// get the sequence
if (gui.getSequences().size() < 2)
throw "Please open two sequences first"
seq = gui.getSequences().get(0)
seq2 = gui.getSequences().get(1)
// create the expression
formula = "a + 2 * min(b, 10)"
// The Functor parses the formula,
// and apply() assigns its arguments to the variables of the formula.
// Ex : Here, seq is assigned to "a" and seq2 is assigned to "b"
seqRes = Functor2.parse(formula).apply(seq, seq2)
gui.addSequence(seqRes)