Skip to content

Instantly share code, notes, and snippets.

@vivek-dhayalan
Created March 16, 2022 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivek-dhayalan/621aa2f0c57495edb4274b5a685f6c51 to your computer and use it in GitHub Desktop.
Save vivek-dhayalan/621aa2f0c57495edb4274b5a685f6c51 to your computer and use it in GitHub Desktop.
import nisp from 'nisp'
var sandbox = {
'answer': (quid) => answers[quid],
'and': (e1, e2) => e1 && e2,
'equals?': (v1, v2) => v1 == v2
};
var exp = ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"] ]];
nisp(exp, sandbox);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment