Merge changes from master into loren

loren authored
revision c151909cce2f1a30e2a1fd672e310ffc98bb4e15
4_FUNctions
# Chapter 4
# A New Chapter

Enter text in [Markdown](http://daringfireball.net/projects/markdown/). Use the toolbar abo
FUNctions

Every programming language has functions. You make 'em, you call 'em, you yell at them, and more. These properties are reminiscent of children in our physical world; and like children they are little bags of potential that can change your world.

Functions make things *easy* in programming. This is a rare and wonderful thing when it comes to a field that largely results in one scratching their head and pondering when trying to solve a problem. Think of them as mallaeble legos you can form into the strangest of things for whatever unique purpose you need. But, like having children, sometimes it is not the best call to declare a function out of nowhere. We won't get too far into the specific use-cases here. This is to be a guide on syntax, not best practice (that comes when we're pro as shit later).

### Defining a FUNction

Functions are very easy to define and work with in Clojure. Since it is a functional programming language, its a damn good thing they did this or we would be having a bad time. Howe
ver, or click the **?** button for formatting help.with great power comes great responsibility. And one of Clojure's many powers is there are a LOT of different means to go about defining functions. We got defn's, we got let's, we got regular ole def's too. We'll begin our evaluation with a simple def, much like we referenced in the earlier chapter "A Loose Introduction".

(def remove_pants [statement] (str statement "and then I took off my pants"))

Now, that line should make you cringe if you're not a masochist. It looks horrible. So since Clojure doesn't care about whitespace and linebreaks let's clean that bad boy up.

(def remove_pants
[statement]
(str statement "and then I took off my pants))

Now that looks nice and friendly. We can now stop and remove our pants whenever we damned well please! It's just like the first time you got your own crashpad, and it is glorious.

8_How_the_Web_Works
# Chapter 8
# How the Web Works

The internet is a strange and wonderful place. Not only can one find just about any nugget of information they so desire, but they can also order drunk food, sell their leftover goods, look at pictures of cats being cute and/or funny, among other things. It turns out there is a large following of folk who post content to this "internet". And some even build applications for it. In this chapter we digress from our Clojure fueled frenzy and dig into how the web actually runs underneath the hood. Web developers who are just picking up Clojure can skip this chapter without worry. However, if you are just getting into web development or have not gotten much exposure, it could prove valuable to read this section and ponder its musings.

### The Backbone of the Internet: Servers

### REST

### API's

### Putting It All Together