Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const rtm = {
- eq: function(a, b) {
- return true
- },
- gt: function(a, b) {
- return false
- }
- }
- const concepts = [0, 1, 2, 3, 4, 5, 6];
- const symbols = ['eq', '=', 'dataType']
- const ops = {
- 0: { L:'eq', D:'dataType', symbol:'=' }
- }
- function execPredicate(e, a, b) {
- return rtm[ops[e].L](a, b);
- }
- console.log('ops', execPredicate(0, 6, 9));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement