⏺ All features implemented and working. Here's a summary of what was … #3

Merged
navicore merged 1 commit from lisp-phase2 into main 2025-12-03 05:10:30 +00:00
navicore commented 2025-12-03 05:09:12 +00:00 (Migrated from github.com)

…done:

Features Added to SeqLisp

  1. Comment support (; to end of line) - in tokenizer.seq
  2. Comparison operators (<, >, <=, >=, =) - in eval.seq
  3. Print function - (print expr) evaluates and prints
  4. Define - (define name value) for global bindings with REPL environment persistence
  5. Recursion - closures now merge with caller's environment for self-referential functions

Examples Now Work

  • hello.lisp - prints 42
  • arithmetic.lisp - arithmetic and comparisons
  • factorial.lisp - recursive factorial (120, 3628800)
  • fibonacci.lisp - recursive fibonacci (0, 1, 5, 55)

Key Implementation Details

  • env-concat merges closure environment with caller environment to enable recursion
  • Define returns a tagged variant (tag 70) so REPL can detect it and update the global environment
  • Examples use single-line format since REPL reads line-by-line
  • Comments return () which is harmless
…done: Features Added to SeqLisp 1. Comment support (; to end of line) - in tokenizer.seq 2. Comparison operators (<, >, <=, >=, =) - in eval.seq 3. Print function - (print expr) evaluates and prints 4. Define - (define name value) for global bindings with REPL environment persistence 5. Recursion - closures now merge with caller's environment for self-referential functions Examples Now Work - hello.lisp - prints 42 - arithmetic.lisp - arithmetic and comparisons - factorial.lisp - recursive factorial (120, 3628800) - fibonacci.lisp - recursive fibonacci (0, 1, 5, 55) Key Implementation Details - env-concat merges closure environment with caller environment to enable recursion - Define returns a tagged variant (tag 70) so REPL can detect it and update the global environment - Examples use single-line format since REPL reads line-by-line - Comments return () which is harmless
Sign in to join this conversation.
No description provided.