import typify, { NUMBER } from '../util/typify';
import stringify from '../util/stringify';

export default function mul(lefthand, righthand) {
  const typeL = typify(lefthand);
  const typeR = typify(righthand);

  if (typeL === NUMBER && typeR === NUMBER) {
    return lefthand * righthand;
  }

  throw new Error('\'' + stringify(lefthand) + ' * ' + stringify(righthand) +
    '\' is undefined.');
}

@@ -16,16 +16,29 @@
 %7B NUMBER
+, STRING, SET
  %7D from 
@@ -304,16 +304,282 @@
 d;%0A  %7D%0A%0A
+  if (typeL === NUMBER && typeR === STRING) %7B%0A    return righthand.repeat(lefthand);%0A  %7D%0A  if (typeL === STRING && typeR === NUMBER) %7B%0A    return lefthand.repeat(righthand);%0A  %7D%0A%0A  if (typeL === SET && typeR === SET) %7B%0A    return lefthand.intersect(righthand);%0A  %7D%0A%0A
   throw 

add intersections and string multiplication