Question: b) Composition. b.1 Consider these functions that format HTML elements: def htmlTaglelem: String, inner: String) = %5%>.format(elem, inner, elem) xal mkbeld = (inner: String) =>

b) Composition. b.1 Consider these functions that format HTML elements: def htmlTaglelem: String, inner: String) = "%5%>".format(elem, inner, elem) xal mkbeld = (inner: String) => htmlTag("B", inner) Define in object p4's main method an immutable variable called mkItalic initialized with a lambda expression that is similar to mkBeld but instead of returning a boldface element (like mkkeld it returns an italic face element, .... b.2 Define in object p4's main method an immutable variable called mkBoldItalic initialized with a lambda expression that uses the compose method from trait Function and the two lambda expressions, mkBold and mkitalic to format an italic bold font style with the composed element
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
