From e82152b3e1036113d65ca93c6e2b906285105db7 Mon Sep 17 00:00:00 2001 From: Jack Firth Date: Fri, 28 Aug 2015 10:16:16 -0700 Subject: [PATCH] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 07883ff..3aac4e2 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ A lens is a value that can be used to focus on a small subpiece of some larger s 1 > (lens-set first-lens '(1 2 3) 'a) '(a 2 3) +> (lens-transform first-lens '(1 2 3) number->string) +'("1" 2 3) > (define first-of-b-key-lens (lens-compose first-lens (hash-ref-lens 'b))) > (define a-hash (hash 'a '(1 2 3) 'b '(10 20 30) 'c '(100 200 300))) > (lens-view first-of-b-key-lens a-hash)