; THINGS. Test inputs for Project 2
; 14 Nov 22
; Unlike the tests for a lab, these are not worth points. Instead, they help
; test if your parser works correctly. Each “;” comment shows the internal
Copyright By PowCoder代写 加微信 powcoder
; OCaml representation of the Lisp expression that follows it. Your parser
; should construct the representation shown in the comment when it reads the
; Lisp expression that follows the comment.
; Number 7734
; Symbol “lobyms”
; Cons (Symbol “a”, Nil)
; Cons (Symbol “a”, Cons (Symbol “b”, Nil))
; Cons (Symbol “a”,
; Cons (Symbol “b”,
; Cons (Symbol “c”, Nil)))
; Cons (Symbol “a”, Nil),
; Cons (Symbol “b”,
; Cons (Symbol “c”, Nil)))
; Cons (Symbol “a”,
; Cons (Symbol “b”, Nil)),
; Cons (Symbol “c”, Nil))
; Cons (Symbol “a”,
; Cons (
; Cons(Symbol “b”, Cons (Symbol “c”, Nil)),
; Nil))
; Cons (Symbol “a”,
; Cons (Symbol “b”,
; Cons (Symbol “c”, Nil))),
; Cons (Symbol “define”,
; Cons (Symbol “!”,
; Cons
; (Cons (Symbol “lambda”,
; Cons (Cons (Symbol “n”, Nil),
; Cons
; (Cons (Symbol “if”,
; Cons (Cons (Symbol “=”, Cons (Symbol “n”, Cons (Number 0, Nil))),
; Cons (Number 1,
; Cons
; (Cons (Symbol “*”,
; Cons (Symbol “n”,
; Cons
; (Cons (Symbol “!”,
; Cons
; (Cons (Symbol “-“,
; Cons (Symbol “n”, Cons (Number 1, Nil))),
; Nil)),
; Nil))),
; Nil)))),
; Nil))),
; Nil)))
(lambda (n)
(* n (! (- n 1))))))
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com