export const FieldTemplate = f => {
  return Array.isArray(f)
    ? f.reduce((arr, cur, index) => {
      return index === f.length - 1 ? arr + `[${cur}]` : arr + `[${cur}].`;
    }, '')
    : `[${f}]`;
};

export const VariableTemplate = v => `$${v}$`;

export const FunctionTemplate = f => `${f}()`;