sicp

sicp sandbox.
git clone git://git.ricketyspace.net/sicp.git
Log | Files | Refs

commit 28d92f8a32885afc0cc11967bbbbe813288fd505
parent 0cb7345537c7fb0537fa2f6108414ca7bf0fed73
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 30 Jun 2018 15:27:00 +0000

net: Add (net ricketyspace sicp two four).

* net/ricketyspace/sicp/two/four.scm: New file.

Diffstat:
net/ricketyspace/sicp/two/four.scm | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/net/ricketyspace/sicp/two/four.scm b/net/ricketyspace/sicp/two/four.scm @@ -0,0 +1,15 @@ +;;;; Under Creative Commons Attribution-ShareAlike 4.0 +;;;; International. See +;;;; <https://creativecommons.org/licenses/by-sa/4.0/>. + +(define-module (net ricketyspace sicp two four) + #:export (sicp-cons sicp-car sicp-cdr)) + +(define (sicp-cons x y) + (lambda (m) (m x y))) + +(define (sicp-car z) + (z (lambda (p q) p))) + +(define (sicp-cdr z) + (z (lambda (p q) q)))