From 861f1f7617a8cdd6df20209ca7df3cab0d386eb8 Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Fri, 13 Nov 2009 02:43:15 -0600 Subject: [PATCH] Commit first working Rosella program. Takes a string argument, converts it with string->number, and returns the factorial. --- core-image.rla | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 core-image.rla diff --git a/core-image.rla b/core-image.rla new file mode 100644 index 0000000..f9cf792 --- /dev/null +++ b/core-image.rla @@ -0,0 +1,77 @@ +#S(#="lambda" + #( + #S(#="template" + #( + #0=#S(#="lambda" + #( + #S(#="lambda" + #(1 #f) + #() + 1 + "\x02\x80\x01\x00"; (set! 128 (cons 1 0)) + 254 + 128 + 2 + 255 + ) + #S(#="template" + #( + #=0 + #S(#="template" + #(#f) + "\x40\xff\xfe" ; i0 ctx k + 1 + "\x00\x80\x03\xfd\; (set! 128 (car 253)) + \x0a\x80\x40\x80\; (set! 128 (fix* 64 128)) + \x02\x80\x80\x00"; (set! 128 (cons 128 0)) + 66 + 128 + 1 + 65 + ) + 1 + ) + "\x80" ; f0 + 2 + "\x09\x80\x40\x03\; (set! 128 (fix- 64 3)) + \x02\x80\x80\x00\; (set! 128 (cons 128 0)) + \x00\x81\x1b\x02"; (set! 129 (lambda 2)) + 1 + 128 + 129 + 255 + ) + 1 + ) + #() + 2 + "\x00\x80\x03\xfd\; (set! 128 (car 253)) + \x0d\x81\x80\x03\; (set! 129 (fix< 128 3)) + \x81\x81\x01\x02\; (set! 129 (if 129 1 2)) + \x00\x81\x1b\x81"; (set! 129 (lambda 129)) + 129 + 0 + 254 + 255 + ) + #f + ) + "\xfe\xff" ; k ctx + 0 + "" + 1 + 253 + 64 + 65 + ) + #="string->number" + ) + #() + 1 + "\x00\x80\x1b\x01"; (set! 128 (lambda 1)) + 2 + 253 + 128 + 255 +) +; vim:set sw=2 expandtab syntax=: