Skip to content

Instantly share code, notes, and snippets.

@LucioFranco
Created October 26, 2016 04:35
Show Gist options
  • Save LucioFranco/33983a14059ad16eacb136355aead0ed to your computer and use it in GitHub Desktop.
Save LucioFranco/33983a14059ad16eacb136355aead0ed to your computer and use it in GitHub Desktop.
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(((false)) or true)")))) true)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(not true)")))) false)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(if true then ((false) or true) else false)")))) true)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(let (verytrue false) in (verytrue))")))) false)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(let (tango (lambda (x) (x and false))) in (call tango with true))")))) false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment