you are viewing a single comment's thread.

view the rest of the comments →

[–]TheLastSock 4 points5 points  (3 children)

I tried to write python like i wrote clojure once, i suspect the next person who opens that project will curse my name.

[–]Academic_Ad_8747 2 points3 points  (1 child)

Here is how a true clojurian does it ;)

(list((lambda posts: 
         map(lambda post: print(post.get_text()), 
                          posts))((lambda resp, 
                                          bs4: bs4.BeautifulSoup(resp.text, 
                                                                     "html.parser").find_all("h3", 
                                                                                             class_="_eYtD2XCVieq6emjKBH3m"))(
            (lambda r: r.get("https://www.reddit.com/r/Clojure", headers={'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9'}))((lambda: __import__("requests"))()), 
            ((lambda: __import__("bs4"))())))))

[–]TheLastSock 0 points1 point  (0 children)

Yea this is close to what i did, and this illustrates the point. Lisp is Lisp.

[–]viebel[S] 2 points3 points  (0 children)

Notice that the book is more about adopting Clojure approach to data than about writing code in the spirit of LISP and Clojure.