code: function isValidReservedWordPosition(tk, iterable, words) {
  	const last = iterable.behind(1) || {EMPTY: true, is: type => type === 'EMPTY'};
  	const twoAgo = iterable.behind(2) || {EMPTY: true, is: type => type === 'EMPTY'};
  
  	// evaluate based on last token
  	const startOfCommand = (
  		last.is('EMPTY') || last.is('SEPARATOR_OP') || last.is('OPEN_PAREN') ||
  		last.is('CLOSE_PAREN') || last.is('NEWLINE') || last.is('NEWLINE_LIST') ||
  		last.is('DSEMI') || last.value === ';' || last.is('PIPE') ||
  		last.is('OR_IF') || last.is('PIPE') || last.is('AND_IF')
  	);
  
  	const lastIsReservedWord = (!last.value === 'for' && !last.value === 'in' && !last.value === 'case' && values(words).some(word => last.is(word)));
  
  	const thirdInCase = twoAgo.value === 'case' && tk.is('TOKEN') && tk.value.toLowerCase() === 'in';
  	const thirdInFor = twoAgo.value === 'for' && tk.is('TOKEN') &&
  		(tk.value.toLowerCase() === 'in' || tk.value.toLowerCase() === 'do');
  
  	// console.log({tk, startOfCommand, lastIsReservedWord, thirdInFor, thirdInCase, twoAgo})
  	return tk.value === '}' || startOfCommand || lastIsReservedWord || thirdInFor || thirdInCase;
  }
docs: const words = require('../enums/reserved-words'); /*
  function defined(v) {
  return v !== undefined;
  }