 So, here's our first example of an actual complete running program. This is a simple rock-paper-scissors game that's played at the command line. The player is prompted to enter a choice of either rock, paper, or scissors, and then the computer makes a random guess, and then the program decides who wins and displays that on the console. So, here are the first two functions, and we'll start with this top one. This get-guess function takes no arguments, and what this function does is it returns a string, a lowercase r, p, or s, depending upon whether the player selects rock, paper, or scissors. Don't mind my misspelling of scissors up there. Anyway, if the player types something other than lowercase r, p, or s, however, then that's invalid input, and this function will return nil. So, anyway, looking at the first line of the function, we use the print line function, and it prints out that string, saying play your hand, r for rock, p for paper, and s for scissors, and then we have a let form that binds to guess the value of read line. Read line is a standard library function, which will take the console input from whatever the user types, and it actually will block the program. Your program will sit and wait while the user types, and when they hit enter, then whatever they've typed is returned as a string from this function. So that string they enter gets bound to guess, and then in the let body we have an if, where the condition simply tests whether or not the guess they entered is one of these three strings, r, p, or s, and if it is one of these three strings it'll return true, otherwise it will turn false. When true, this if form will return the guess itself, and so the let will return the guess, and the function in turn will return the guess, otherwise when the condition of the if is false, the if will return nil, so the let form returns nil, and then the function returns nil. So just to be clear, looking at this condition, it's a get function with a map of each of the valid strings as keys, each with the associated value true, and so if we look up in this map the string of guess, if the user's entered string isn't one of those three strings get will return nil, because that key is not found in the map. So that's the get guess function. Looking at this other function, winner, what this one does is it takes a guess from the two players, and it returns one when the first player wins, or returns two when the second player wins, and it returns zero if there's a tie, if both players make the same guess. The guesses are passed to the function in the form of a string of the lowercase character rprs, and first thing that the function does is it has a let form binding to the symbol guesses, a vector of both guess one and guess two, and then in the body of the let we have a conned form, a condition form, where the first condition is testing whether guess one is equal to guess two, if so then the con returned zero, otherwise if guesses is equal to a vector of p then r, then we return one because paper beats rock, otherwise if the guess is equal to a vector of r then p, then we return two because again paper beats rock, but this time the second player is the one who played paper, and likewise through the other cases, rock beats scissors and scissors beats paper. Aside from those two functions, the get guess and winner function, we need just one more function which we call play hand, and what this function does is start with a let form in which it binds to computer guess, the result of rand int with the argument of a vector with the strings rp and s. The rand int function returns a random element from its argument sequence, so rand int will return at random either rp or s in the form of a string. The symbol player guess gets bound the returned value of get guess, which again will prompt the user and ask them to input either the string rp or s, and if they input anything other than that then this function will return nil, so player guess might actually be nil, and then finally winner is bound the result of a call to the function winner, notice that when binding in a let form a value to a symbol we can still use that symbol in the expression and have it resolve to the outer context not to the context of the let, so winner in the parentheses refers to the function, and to this function we pass first computer guess, and we pass then player guess, so the computer is player one, and the human player is player two, and notice also here that in this let form in this expression we can use the symbols bound from previous bindings, so the order of bindings can actually matter in a let because in subsequent bindings you can use the symbols that have already been bound, and that comes in quite handy in a few cases such as this one, so in any case the symbol winner here gets bound the result of the winner function, it should have the value either zero one or two, or in the case where player guess was nil winner will actually also return nil, so anyway in the body of the let first we print line the computer guest and then the value of computer guess, and then we print line you guessed colon and then the value of the player's guess, and then we have a con form with four mutually exclusive cases, in the first case if player guess equals nil then we print line your entry was invalid, otherwise there's the case of well does winner equals zero if so then we print game tide, if winner equals one we print computer wins, and if winner equals two then we print player wins, again be clear it's a con to form so all those cases are mutually exclusive, so note that our playhand function is clearly an impure function because it's printing output and it's invoking another impure function the get guess function, so in our first example closure program we only have actually one pure function, so it's not much of a win for functional programming I suppose, but in more complex examples you'll start to see that no this is not the usual case, we usually strive to have a majority of pure functions rather than impure functions, but in such a simple program as this that wasn't the case, the last thing we have in our program after all of our function definitions is we simply have this loop where we over and over again we just invoke the playhand function, so each time you play a hand it then plays another hand, and definitely until you just have to control C out of the program, and that is the entirety of Rock, Paper, Scissors played on the command line that's three fairly simple functions.