Skip to content

Instantly share code, notes, and snippets.

@b0oh
Created September 3, 2018 15:39
Show Gist options
  • Select an option

  • Save b0oh/a5ba48e0f0f4e53f45f3268b7f913caa to your computer and use it in GitHub Desktop.

Select an option

Save b0oh/a5ba48e0f0f4e53f45f3268b7f913caa to your computer and use it in GitHub Desktop.
(let* ((....))
;;; receive : channel0 -> pair term channel1
;;; send : channel0 -> term -> channel1
(lambda (receive send channel)
(let ((loop (Y (lambda (loop channel0))
(let* ((result (receive channel0))
(sexp (first result))
(channel1 (second result))
(term (extract sexp))
(normal (reduce normal-order term))
;;; late binding how? probs using eval and environemnts
;;; (expr (eval (make-env (list "receive" recieve "send" send "channel" channel1))))
(channel2 (send term #| or expr |# channel1)))
(loop channel2)))))
(loop channel))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment