Hi All,

I'm working through Brian Harvey's 61a 2008 SICP lecture (http://
www.youtube.com/watch?v=ljOrUCqsixs) and could really use a hand
translating a couple of simple lines from scheme to clojure.

Here is the code:

1:  (define (compose f g) (lambda (x) (f (g x))))
2:  (define (twice f) (compose f f))
3:  (define fourth (twice sq))
4:  (fourth 3)

I've gotten this far and then I get stuck when I try to do line 2 from
the above:

1:  (defn compose [f g] #(f (g %)))

Thanks in advance for any takers,
Joshua

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to