Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does #> operator mean in Scala Lift?

Studying Lift I've immediately found a non-familiar #> operator. What exactly does it mean? Example:

/**
* Put the messages in the li elements and clear
* any elements that have the clearable class.
*/
def render = "li *" #> msgs & ClearClearable

I can read the comment to know what's the line for, but am not sure about the code mechanics here.

like image 959
Ivan Avatar asked Feb 03 '26 03:02

Ivan


1 Answers

The operator #> is used to create CSS Selector Transformers.

You provide a CSS selector as a string and then apply it to the given argument which can be a sequence, a string or a NodeSeq and get a function of type NodeSeq => NodeSeq that applies the transformations. The & is used to chain those transformations.

like image 160
Moritz Avatar answered Feb 04 '26 20:02

Moritz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!