From 678ae20c110a9c775bcca8aa7f3378159efe46f4 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Thu, 26 May 2022 00:21:20 +0900 Subject: README: Update. --- README.md | 50 ++++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 0ba7922..02b9116 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,29 @@ -# pict-sexp -Draw sexp. +# pict-cons +Draw cons. -![fib.png](https://raw.githubusercontent.com/wiki/tojoqk/pict-sexp/images/fib.png) +![example1.png](https://files.tojo.tokyo/pict-cons/example1.png) # INSTALL -``` -raco pkg install https://github.com/tojoqk/pict-sexp.git -``` + + raco pkg install https://github.com/tojoqk/pict-cons.git # UPDATE -``` -raco pkg update https://github.com/tojoqk/pict-sexp.git -```` + + raco pkg update https://github.com/tojoqk/pict-cons.git # UNINSTALL -``` -raco pkg remove pict-sexp -``` + + raco pkg remove pict-cons # USAGE -Save as "pict-fib.png". -``` -#lang racket -(require pict) -(require pict-sexp) - -(define pict-fib - (pict-sexp - '(define (fib n) - (cond - [(= n 0) 0] - [(= n 1) 1] - [else - (+ (fib (- n 1)) - (fib (- n 2)))])))) - -(send (pict->bitmap pict-fib) save-file "pict-fib.png" 'png) -``` + +Save as "pict-example.png". + + #lang racket + (require pict) + (require pict-cons) + + (define pict-example + (pict-cons '(+ a (* b c)))) + + (send (pict->bitmap pict-example) save-file "pict-example.png" 'png) -- cgit v1.2.3