Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. const rtm = {
  2. eq: function(a, b) {
  3. return true
  4. },
  5. gt: function(a, b) {
  6. return false
  7. }
  8. }
  9.  
  10. const concepts = [0, 1, 2, 3, 4, 5, 6];
  11. const symbols = ['eq', '=', 'dataType']
  12.  
  13. const ops = {
  14. 0: { L:'eq', D:'dataType', symbol:'=' }
  15. }
  16.  
  17. function execPredicate(e, a, b) {
  18. return rtm[ops[e].L](a, b);
  19. }
  20.  
  21. console.log('ops', execPredicate(0, 6, 9));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement