mirror of
https://github.com/vonhyou/lisp-interpreter.git
synced 2025-06-08 10:21:59 +00:00
create a module
This commit is contained in:
parent
ced73fc2f3
commit
1461b17e78
1 changed files with 0 additions and 16 deletions
16
prol.rb
16
prol.rb
|
@ -3,11 +3,6 @@
|
||||||
# Start at: Apr. 10, 2021
|
# Start at: Apr. 10, 2021
|
||||||
|
|
||||||
##### Parser
|
##### Parser
|
||||||
# :parse
|
|
||||||
# :tokenize
|
|
||||||
# :read_tokens
|
|
||||||
# :atom
|
|
||||||
#####
|
|
||||||
|
|
||||||
module Lisp
|
module Lisp
|
||||||
|
|
||||||
|
@ -60,17 +55,6 @@ module Lisp
|
||||||
scope.merge op => ->(*args) { args.inject(&op) }
|
scope.merge op => ->(*args) { args.inject(&op) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# @global_env.merge {
|
|
||||||
# 'min' : ->(*args) { args.min },
|
|
||||||
# 'max' : ->(*args) { args.max },
|
|
||||||
# 'car' : ->(arr) { arr[0] },
|
|
||||||
# 'cdr' : ->(arr) { arr[1..-1] },
|
|
||||||
# 'cons' : ->(arr) { arr },
|
|
||||||
# 'quote' : ->(arr) { arr },
|
|
||||||
# 'print' : ->(arg) { p arg },
|
|
||||||
# 'begin' : ->(*_args) { true }
|
|
||||||
# }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##### Lisp Eval
|
##### Lisp Eval
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue