What does ampersand between functions in Scala mean

I came across a strange syntax in Scala, can someone explain this to me, what ampersand means when they are associated with functions passed as an argument to another function?

partialUpdate { SetHtml(currentAmountId, Text(leadingBid.toString)) & SetHtml(nextAmountId, Text(minimumBid.toString)) & SetHtml(winningCustomerId, winningCustomer) & SetValueAndFocus(amountId,"") } 

Thanks for explaining this to me.

+6
source share
2 answers

& JsCmd method in the Lift framework , which combines two teams. It will not work with normal Scala strings.

+11
source

In this case, it looks like it combines the output of SetHtml calls.

Is this clearer?

 partialUpdate { SetHtml(currentAmountId, Text(leadingBid.toString)) & SetHtml(nextAmountId, Text(minimumBid.toString)) & SetHtml(winningCustomerId, winningCustomer) & SetValueAndFocus(amountId,"") } 
+1
source

Source: https://habr.com/ru/post/906859/


All Articles