diff options
author | Tojo <masaya@tojo.tokyo> | 2018-06-24 12:32:39 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2018-06-24 12:52:25 +0900 |
commit | 0795e7bca7d02996a8f1852218118cd82e4e5309 (patch) | |
tree | 544f5d261ff9d2d69cd97c4046927768ad99b90a /README.md | |
parent | a06e6a9dbc872373c0d5c8092534929be60019a3 (diff) |
Add INSTALL and USAGE section
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2,3 +2,28 @@ Draw sexp. ![fib.png](https://raw.githubusercontent.com/wiki/tojoqk/pict-sexp/images/fib.png) + +# INSALL +``` +raco pkg install https://github.com/tojoqk/pict-sexp.git +``` + +# 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) +``` |