Skip to content

Instantly share code, notes, and snippets.

View aparatext's full-sized avatar

aparatext

  • Sol-III
  • 07:36 (UTC +03:00)
View GitHub Profile
@ahoka
ahoka / forth.scm
Last active November 20, 2024 13:28
(use-modules (srfi srfi-1))
(define (push-number maybenum)
(lambda (stack)
(let ([number (string->number maybenum)])
(when (not number) (raise (cons 'undefined-word maybenum)))
(cons number stack))))
(define (read-forth dict prog)
(let loop ([procs '()] [prog prog])