INSTRUCTOR:  Okay, good evening, how are people doing this week?  -- better than last week, sounds good, life is improving.
	I have one idea, to -- last week I was tired and pretty much off and sensed everyone else was off and non energized.  What I did, some people talked about, would you be interested in trying to do something that is closer to flipping the classroom.
	In particular, I don't really have good, really good videos to do, but I have the session that's I've done in previous years.  And so they're big, they're one hour chunk videos through breeze -- and we can try watching those and use, the class time for only reviewing those, going over problems and going over homework's and similar problems.  So....
	Again the drawbacks, one big thing, not little 5 minute chunks you can replay easily, if you want to find something, it's hard to find where that was in the video index.  But sounds you're all for that.  So -- I mean, if you have concerned about it, let me know, or through e-mail.  And, try doing some sort of that stuff and I might go ahead and ask, people like, as you watch them I could give you little credit, as you watch them, go ahead and sort of note at which times certain topics occur, if you put that on the discussion board, everybody can see that.
	Yeah, then I have to come up with exercises that aren't there, but, I can try to work on that, my, yeah, yeah, in fact if you go back and look at previous semesters, little videos and note are posted for previous semesters.
	So --okay, I'll go ahead and send out e-mail, gosh, tomorrow, I'll have enough time -- I always tell myself that -- and I'll post the links to some videos an we can try that.  We can also try for say 2 of the 3 hours of material and see if we gradually work ourselves into it.  So -- okay, I'll post that again, send e-mail if you have concerns and ideas, biggest drawback, I'll have a set of lecture notes, lecture note are for me to lecture off and not end-user readable -- necessarily.  But between the video and the notes that should work okay.  And I'll put extra problems to work on, and we can work on them both class time -- and good.  So we'll try that, if you're anxious if when we finish tonight.  After 3 hours more of this you want more of this immediately, you can go to URL for class and where it has put in 2014 fall and you can see all the previous semesters, including distant videos.
	Sometimes there's little glitches, where I didn't record the whole thing.
	Okay, good.  -- Steven this, week's note or videos for this class or last semester's classes.
	Okay.  All the stuff fits together, going back and looking a second time might set things up for other things.
	Okay, now we're recording.  Share my screen.  Let me check that one link is up there.  Not breeze -- I think I just put the lecture notes up -- let's see -- copy link location, bring up this --
	>>>  Before doing anything else, wrapping up last time we talked about writing functions for tail recursive and definition of tail recursive, hopefully not so bad.  When function makes recursive call, but when recursive call comes back with an answer it doesn't have it do any more work, it passes it along, and we like tail recursive, because what is the property that tail recursive property has on silicon sitting in front of us?  -- what does a tail recursive function, unlike most recursive functions, how does it help our hardware, that's definition of tail recursive, recursive call the last thing you do in the main call.
	Why does that help us?  What's the cool part about it?  Yeah, exactly.
	Usually want to make recursive call.  Other people, I'd be happy if other people halfway through typing and someone else puts an answer, finish your answer return too.  It gives me idea, where other people are coming from.  So, all of those are correct, doesn't put function calls on the set.  Usually when you make recursive call, doesn't put on stack.  When we have list of one hundred thousand numbers that's a hundred thousand stack frames, that gets worrisome.  And, 10 million things, which is not unreasonable situation, then we're in big trouble, using up a lost memory.  We look at the same sort of loop in Java, you add up a list of numbers using only your sum so far and maybe, the list that you're processing.  -- and don't need anything else.  You only need those 2 variables and you can go ahead and do it, the idea, being, this loop, you go through, you have local variables, when you want to go to top of loop, you jump to another point of code but don't make a new stack frame, and clobber your local variables, you mutate them. 
-- in tail recursive call, doing the same thing, tail recursive going backup.  If TC, you don't need the master function once makes recursive call, won't need local variables, the answer coming back will be exactly the answer, this is compiler optimization saying, don't go ahead and make a stack frame, make I new stack frame where using variables and clobber over them and generate same loop code, if we have tail recursive function and compile letter that detects tail recursion.
	Or identify when is, tail recursion, okay.
	We like that, and that explains and some reason why, why people program anything (Inaudible) if you look for a 4 loop and Y loop, there are some concepts in Racket, but harder to find and code, they don't come up nearly as much, because part of writing them incursive and tail recursively is morally a loop and don't need the extra loop constructs.  We finished last time, talking about wouldn't it be nice if we had while loop.  What would it look like if Racket, if we tried to make it look like a function call and this might be an example.  Why, while, suppose we have function, call while/list and it takes index, it, initial index, takes in condition like every while loop has, it takes end of   loop update like 4 loop has.  Keep going ahead and take the index, while we want to continue, to index and repeat that, in our particular version, return a list of indices we use in that process. 
	How would you pass in the -- the, loop condition?  How long you want to continue for?  -- well we look here, going, to actually pass in a function.  So here is one example, I can pass the function while list, give me a number N, while is positive, subtract one, whatever number, here is example, starts at 7, index starts at 7 and continue while positive.  When no longer 0.  It's positive.  
	The way we go to loop again, this is odd, silly, when we return a list of all indices we encounter, so yeah, what's the cool part to me, we're passing in the loop condition as a function.  We're passing in the end of loop update as a function, the while loop will take the index, feed it to that function and get an answer back and consider new index.  Okay?  
	This other example here, line 183, this is last week's file, tail recursion lecture, start at 10, initial index is 10, and while this condition holds, lambda K, less than K 50, index is less than 50 and using N and K that are different from maybe I, say I'm passing the function, any function here, yeah, so while, while condition is, a number is less than 50, which number of the index? 
Okay.  And then how do we update index?  Apply this function, function takes in the number and add 7 to it.  Easy enough.
	Cool thing, that's how we pass in.  We don't need special syntax like Java script or most languages for loop, we wrote this as a function just using function call.  In Java I can write the same while thing as long as it able to pass functions we saw, you can do Java in roundabout way.  Okay, I thought that was pretty cool.
	I think last one is -- hey, here are, indexes, we start as empty image, our, criterion for continuing is, while something, while image has width of less than 150 we go ahead and do this.  What is this?  Function that takes in image and makes overlays with some sort of square.
	Okay.
	And we keep repeat thing loop, and when we ran that, we saw and went ahead and got the answer and had a list of these, these square are the indices, started with empty image and over laid squares and so.  
	Okay.  That's, I think that's kind of cool we don't need while loop to be in our language, we can do it or selves an reason to take about tail recursion, unlike naive recursive this is a silent recursion that doesn't build of stack frames, may produce the same as loop would.
	One thing I'll mention is, we had the, code for while loop, we had a helper function that did most of the work.
	This template, this function did not follow the template for a list.  No, it returns list, takes in what?  Any index, any type of value.  And, it continues, some continue function, update function and doesn't have template to follow.  In particular not determinant, it's different than our template we built through the data definition process, the, following the data definition, if you have data definition that makes sense you get code from that, might be recursive, but guaranteed to terminate.  Never run forever if you follow template correctly, unlike this, you have to be clever, like quick sort doesn't follow a template and you have to be clever to make sure you don't have issues.  -- (Inaudible) is side problem.  Write me a function that will sort a list of number but follows the template.  My question is, you can do that, and not that hard, you'll need to maybe make a helper function but helper function will follow the template. 
	If you understand the template you understand, go ahead and write that.  And my question becomes, what sorting algorithm is it that template generates for you.  What is the natural way to list from data definition.  Not quick sort, quick sort is fancy thing but uses different clever way and using recursion that is touchy err, harder to get right.
	And people don't usually teach, when they teach recursion they tend to teach both structural recursion that follows data deaf definition and doesn't follow the data definition, don't realize the different there.  We work on recursion that follows the data definition.
	Anyway, that was review of things and last week I want to think with about while we approach this week.
	In particular last week, I think it was cool, pa passing these, passing in the while, the continuation condition of loop, passing in as argument and do that easily when we pass functions, especially convenient when we have little lambda expressions.  To do that is like, man, lambda.  Is there anything it can't do.  It just sit there's and is awesome.
	Now by the way, yes, the,  this while loop here, might look a little clunky err, unlike a, while loop write in Java, I don't need to sort of say here is a function that takes in a number K, I would say, hey my index is lex that is 50 and say something like, N gets N plus 7, I with use the same, have to use the same variable for all of those.
	The while list does provide some syntactic convenience, short hadn't, don't need to put in some of the lambdas, but I don't need a while construct in my long or loop construct that is different.  I'm happy as long as I have, really an IF condition and ability to pass in, to call functions and pass in functions to knows functions -- so.
	Okay.  So -- all that aside, that was cool, today's lecture is more boring.  It's going to go back and hit Spain data definition and more practice using template.
	Okay.
	In particular, I want to go, and I'll, scroll down the screen for a second, and then -- come back.  I'm getting into genealogy or something like that and I want to represent ancestor trees.
	So it's a person and then their ancestors, parents, grandparents, as far as back as I can figure out information for.
	For example, I might want to say -- BART, I want to keep BART was born in 1982 has brown eyes, and what else?  Do I have anything else?  Just those.  And, BART went ahead and had some parents, BART is maybe the child of Marge and Homer.
	And I think of this as tree, because I think of -- oops -- something like this.  Of course Marge and Homer have their own birth year and information like that.  Born 1952, whatever -- okay.
	And along with that, we want to say -- who are Marge's parents.
	Marge might have I think if you're a Simpson's fan, Marge's mother's name is Jackie, but Marge's father we don't know anything about Marge's father.
	And if doing a geology tree, I will hit something where I know there's a person there but don't know anything about them, birth year etc...  This is what I want to represent in a program.  I want a data definition.  I'll call this ancestor tree, not worrying about children going up, going up to parents.
	So Lisa doesn't fit into BART's ancestor tree the way we're doing this.  I want a data definition.  One of things we saw, Jackie is known -- but Jackie's I think -- at least in when I wrote up these notes and went to search the SNPP.com, Springfield nuclear power -- it talks about Marge's parents and which episodes they came up in, Marge's father is never mentioned and I don't think marriage's grandparents are known either, I guess really, we have some things here.  And Homer's parents, turns out we do know Homer's parents -- but for the sake of drawing this tree this might be a complete ancestor tree here.
	So -- okay.
	So what data type should we use to represent this tree?  Tree is a number.  Does 47 seem like it fits the tree?  No.  I don't know what means.  Use string to represent this tree?  I type wd a bunch of characters but I don't think insider program, I think a string filled with backslash and forward slash probably awful way to organize the information.
	So, what do we want now?  Part of thing we found out.  For BART, what information do we keep track of for BART?  Birth year, eye color and what else?  -- what else do we know, besides name, birth year, eye color and, oh, who his mom is.  Yeah.
	And who is dad is.  Exactly.  And, what do we, how should we be representing BART, this thing here?  Probably some sort of struct?  Struct child is going to have a name and a -- year of birth -- YOB, eye color I'll call eye.
	And then a mother and father.  Any particular, the name will be a string, the year of birth, what data type should we use to represent the year of birth?  Yeah.  I like inter, I guess really, if you want to keep track of when they're born, that's point in time, we'll go with the year and tick with that, INT, and eye color, maybe use a symbol.  And what type should I use for the ma and pa?  Wait a minute.  Bart is a child object and define struct child with 5 fields.  What's the type of the field ma and pa?  -- maybe child, mom and pa be child objects, but that's not always the case.
	Why not?  Can you show me something in the tree, child object who's mom and pa are not child objects, child structs.  If I look at, Marge, her mother is a child struct, her father is not a struct, we don't know a string and birth year and eye color and parents.  Okay.
	So, really we want something like, con, I'm still looking at data definition, but yeah.  This maybe another way of thinking about it.  Unknown or child.
	-- okay, we'll fix this, come back and do this.  What's the smallest ancestor tree that you can think of?  Somebody give me the smallest example of an ancestor tree?  One branch?  Yeah.  Smaller?  Can we get smaller?  -- 
	Open parentheses, not sure what that means, doesn't look like anything we talked about here.
	But on the right track.  Yeah, unknown.  I think this unknown, question mark, question mark, question mark, that's the smallest -- I'm going to make ancestry tree of person who discovered the west pole.  Don't know anything about them, can't use a child struct, ancestor tree itself could be unknown, and represent the yes mark, question mark, question mark, I'll use the symbol unknown.
	I could use Boolean faults, I could use the string -- or number 23 if I wanted to.  I can use any sort of marker value.  Yeah.  Hopefully, we know they're name and makeup eye color, I'll look at paintings and look at eye color, and they're year of birth I guess would be defined to be 0 in some scheme.  Their parents I would not know.  Everybody does have parents, they do, so.
	Anyway that's ancestor tree is that -- other -- a child object.  -- something like this.  Except now, ancestor tree is either unknown or child object.  Child was make child, string, child unknown, child -- is there a special term we have for child or unknown?  -- 
	Yeah, exactly -- ancestor tree, that's exactly what it is, that or that.  That's really what I want to put here.  Because we have this more precise name for it.  Okay.  This will be our data definition for a, oops -- an ancestor tree.
	And, maybe I'll go ahead and phrase it like that.  Ancestor tree is unknown or make child symbol ancestor tree, ancestor tree.
	 I didn't fill in eye color and birth year, it's hard to type in ASCII, for all of those people that have birth year and eye color, yeah.
	Thanks, my picture was unclear.  Or as you know clear that I was leaving off information, intending to leave off information.  I see what you're saying.
	You're right, in reality we might want to say, some of these other things might be string or you know, if we know their name but do -- do know name but not birth year and eye color, this might be a string or false.  Hey that's going to be another union type somewhere else.  A possible name, possible name is either false or it's a string and I might have possible birth year, and possible eye color.  Yeah.  Wouldn't be a third cond.  I see, some sort of make known child and make partially known, or make child but without eye color or something like that.  I don't like, because that's not describing the person, that's more the fact that I didn't choose a data representation that can reflect, hey I know this, or I don't.  I think having a, union type, possible string -- or you know possible name or whatever, possible string is a better approach to that.
	By the way, how do we, in Java represent a possible string?  -- what type do we use in Java?  Why does it work?  -- we'll come back to this.  In Java probably use string.  Java.
	If we don't know the name, we would probable put null.  In Java, type check as string.
	(Inaudible) -- but -- that's what people do in Java, we'll come back to that a at that point.
	Cool, I think this is here.  Can you give me some examples of ancestor trees, everybody type in one example.
	-- has to be different than people above you have typed.
	Okay.  Aaron got the easy one.  Quote unknown.
	Well, again, in Java, null, the null string, empty string and there's null.  I don't know what they mean by null string, that term doesn't make sense.  The empty string might be a string, then you have to worry about somebody that exists but does not have a name as opposed to, somebody who exists and their name is empty string, like intentionally not given any further name, as suppose to somebody you don't know what they're name S okay, that's one example, of a child.  Any other examples?  -- make child with Bart, because she have a string and 1982 because symbol that.  Symbol brown, you have a string here, Marge, that doesn't quite work because they have not followed that template.  Marge, the string Marge is not an ancestor tree, but ASH has one, born in 1981 brown and unknown unknown, like the tree for Jackie up here, one person with 2 unknown parents.
	Yeah.  Okay we can make trees that look like, question mark, question mark, and make a tree that looks like this.  What's the next biggest tree we might make?  Maybe the one that looks like Jackie and Marge.  Okay.
	So you might say -- in fact, I'll go ahead and reveal and scroll down to the file if playing at home -- here is all that exact same information that I wrote.  Okay, examples of a tree.  So then, one is like ASH mentioned, Jackie born 1926, Jackie brown unknown unknown.
	And Marge, have information, and mother is copy and paste what I have here.  I need to, make child Marge and put in 2 different anc trees and copy them, for the other for the father I'll copy and paste the one I wrote online 20.
	So great, that's another one, and I can make, child ever homer 1951 brown, unknown, unknown -- okay.  Can now, can we go ahead, using that, can we make the tree that corresponds to Bart in my diagram.  Now I can say make child.  -- Bart 1982, I say, brown and for the mother I'll copy paste this whole thing --and for the father child paste this whole thing that I did for Homer and then go indent it to make myself less insane.
	-- I see there's a -- in fact if you look at part highlights, in lines 28-37 and tilt your head just right you can look and say, I see a tree.  I see Bart, and then above Bart in the tree I see Marge and Homer above that, and above that I see Jackie.  Actually see that tree structure visually once we indent it meaningfully.  We can go ahead and make this child object, and, one thing to notice, how did we make it?  Started with small ones like unknown and made slightly bigger ones like Jackie and then slightly bigger ones like Marge and then go ahead and make Bart.
	Okay.
	Great we have all of that.  In my file, skip down, line numbering has changed now since, I'll type stuff that you haven't.
	Skip pass ancestor tree for a second, and again I have another section O section that says examples of data for ancestor trees and then a noun and I filled out this information.
	Here I have Homer's parents, turns out they're both known and we have the real authentic Simpson's material there but I have to makeup the birth years an eye colors.
	Abe and Mona are Homer's parents.
	I gave names to those.  That's easier to copy and paste.
	-- make child Homer, da-da-da brown.
	If I use identifier, what does Racket do?  You see this identifier Mona, really substitute the value of that identifier, what we define it as in my line 70 on the screen.
	What I have online 75 is probably how I would write it, but immediately expands into what's online 72, 73, 74, by substituting in the variables an gives a name to that.
	This is maybe obvious, but, okay if, with the fact I say, the tree involving the person named Homer I happen to name that variable Homer?  Is that okay?  -- that just, obvious name to use for that particular tree, don't confuse the name of variable I happen to choose which can be figure for the string stored inside the struct, those are 2 different levels of things.
	Define Marge and Homer first?  Yes.  So before doing Bart, we don't have to, I could define him or type it out.  Either way.  So, in these line sections, second part, I have examples of data, underneath the check expect for size -- that's where I go ahead and have, I use the names to make life easy, because I named every single tree that I made, now, you have to find Bart to be that, and refer to this local variable Marge and local variable Homer.
	But expands out.  If I run this, and do I have a.  I'm going to type in, Bart -- didn't like that.
	Da-da-da -- so it didn't get down to, yeah.  This is annoying.  Comment out everything here.
	Comment out most all of the file here just to show, or reinforce this fact.  Run this, we had some trees we made ourselves, excuse me -- coughing -- or sneezing.
	Sorry, when I type in, -- down on the bottom, I say, type identifier Bart.  And I get back, see it all here, I get back make child of, Bart 1979 brown and make child again, and this is the tree constructor, one character better level.  Tip your head to the right and you can see, visualize the tree structure there.
	And, why, far back?  We use those variables when building but immediately substitute the value of variable.  Substitute the entire sub tree for Bart.
	Thank you.
	Yeah, so, we're focusing on the male children, Lisa could have her own ancestor trees, way the define ancestor tree we're looking at one person and ancestors above them.  We can come back and talk about descendent trees an maybe keeping track ever geological information and marriages an half children, that's complicated graph structure.  A little more involved in defining.
	So -- okay.
	Go ahead and, give me the template for any function that handles ancestor trees, don't worry we'll stay simple.  So give me the tem ply for function that handles ancestor trees.
	Type in Dr. Racket -- and this is going to be a boring question, the exact thing we've done a thousand times follow steps for writing out template given data definition.
	I'll scroll up so you have data definition in front of you.
	Give me the template for any function that handles an ancestor tree, I'll give you about 2 minutes.
	Give me the template for any function that handles an ancestor tree.
	2 minutes.
	If you go to designer page, there's stuff to write about, how to write a template.
	 give another 30 seconds or so.
	okay.  So looking at this data definition, what sort of data definition is this?  union type?  Or compound type?  Ancestor tree?  yeah.  Union type and I didn't have the word OR typed in here, but on either, ancestor tree unknown, or struct, I don't get both of those, I get one of those or the other.  So, we'll go down and let me scroll down in here -- template for any function, how do I handle an union type?  
	Yeah, cond with how many branches?  Oh.  2.  I like that answer.  Go ahead and delete all of this stuff.
	Okay.
	Why 2 branches?  Look at data definition and ancestor tree is either unknown or it's a struct, okay, that's great.  Okay, cond with 2 branches, when giving points I give union type and ask for template, did you have a cond, if you did how many branches.  The right number of branches.
	So union type, cond with one branch per option, and we need a question that can differentiate one type from the other.  So what's the question I can ask to tell, I'm given the blob, is that, code that can ask is that blob the symbol unknown or child structure.  Never be the empty list.
	It's either a symbol, which is not empty list, and child structure, which is not a list.  Child question mark.  That's a predicate we got for free, right?  Child question mark.  And how do I call that function?  -- when I did define struct I got a, constructor like make child -- so -- I think this is what you mean, ASH, child of?  ANC.
	So, that goes, is my, I was given ancestor tree, I'm calling ANC, is it a child struct, yes or no.  You get a lot of people who don't get full points, just ask child, no you have to call the function.
	I guess down here I could say ELSE, that will be fine, that works.
	Is there a better question that works.  But if I can flame a condition explicitly is there some way to ask, is the ANC the symbol unknown, I can't say quote unknown, that's not a question.  That's just a symbol.
	How do I make them into a yes or no question.  Cond starts with yes, no condition.
	Yes/no condition.
	How can I ask if I have the symbol unknown?  -- yeah, okay, symbol equal, symbol equal of, that wants 2 things, what equal to unknown.
	-- yeah, is ANC equal to unknown.  I like that better than just saying ELSE, in particular I can swap the order of these 2 branches and everything is still fine.  So -- and now, it doesn't quite work.  It turns out, say we have that code here and pass in child object, say I swapped the order of these conditions I have on the screen, it comes along and has symbol equal of child structure of unknown, symbol equal question mark will bark, if you give it something besides symbol that will be a type error.  So close -- I guess instead of that I could go ahead and -- I can ask if, hey did I get a symbol?  Right?  -- temporarily delete this, and come back to that.
	Would that work?  Is this enough to distinguish which, when I have unknown versus when I have a child?  Yes.  If I was given ancestor tree, and symbol, only one symbol it could be.  If not given ancestor tree, that's not my problem.  I said this is a function that handles ancestor tree, if you try to pass me a string or Boolean or different symbol, yeah, that's not my problem.  So -- okay.
	So, this is okay.  I guess really though, to be precise, -- I kind of like writing this is my condition.
	Is it both, ask if symbol, if it is symbol, ask if it's particular symbol unknown, that's a little safer to me.  Okay.
	And by the way, now we only, because AND short circuits, say you pass in child it will immediately turn false, won't try to call symbol equal, any of those would work, just ask symbol, this is kind of annoying, we'll do this every time we write a function, I'll go going to cut, I'm going to give that shorter name?  -- yeah.
	I'm going to write a function called unknown -- and what is it?  It going to be exactly this here.  Get a slightly different name.
	Okay.
	And now I have a function unknown -- takes in anything and returns a Boolean and now I use it up here.
	Depending how much I'm doing, I might write that little function here.  And by the way, now, before I, finish template and then take break, but, you know.
	Here I could have written -- it turns out I can't use symbol equal question mark, but there is generic function called equal, that does take in any 2 types and compare them for equality.  Like Java dot equal, defined for all objects.
	In Racket there's equal question mark you can use, if I know it immediates to be certain type, I like to ask narrow precise question that I can.  Even though I can use equal, I prefer using symbol equal question mark.  And because if might be non symbols, I might need to guard it.  If writing code in real life I would probably do this unknown and leave it exactly like that.  Okay.  Have a few test cases for unknown, unknown of 17, unknown of make child, unknown, unknown.
	Back to this template here.
	Great.  Cond with 2 branches.
	And now, we saw that, da-da-da -- if some of those branches are themselves product types.
	I look at unknown, if I'm here I don't know any further information, all I know is I have the unknown ancestor tree, can't do anything more.  If I have child object, is there anything else I know.  Yeah, I can pull out the fields.  So child names, again make sure you get, if writing this template, if you didn't get those names practice, other templates looking to, the reading, how to design programs, I can give you links to there that has exact, further examples.
	Be sure you're call thing function correctly and not calls child hyphen name, or ANC dot name.
	We need to call the selector correctly.  Child name, child year of birth, child, what are the other fields?  Name your birth, eye color, mother,  okay.
	Sounds good.
	Any else you forgot about here?  Oh.  Add the natural recursive call, think about what type each piece is and some function that's might process that type.  I'll go back and swap the order -- what is the type of child name of ANC?  This gray area, when evaluate this expression it will come back as what type?  Yeah, string and how did we know that?  -- except, data definition, it said right here, name field was a string.  Exactly.  Okay.
	So, okay, I'll call maybe substring or spring (Inaudible) a string append, eye color is symbol, maybe call symbol equal on it.  What type of child ma of ANC?  -- yeah, ANC is parameter name, the type we have is ANC tree, ancestor tree.  Where do you find that out?  Exact same thing, yeah, exactly.  Go up here, said right here, that field, was ancestor tree.  Okay.
	What sort of function do we call on ancestor trees?  What's the function we can, use?  Hey, this is where, now that hint, design, add the natural recursive call as appropriate.  So -- meaning, hey if you're, this is 9 times out of 10 -- if you're writing a function that handles ancestor trees and have pull out piece of some information, think about the recursive call.
	And go and add that in.
	-- okay.  And then somehow we're going to put these values together -- oops -- don't like that -- so -- I'll have this open paren here and call something and, pass it at these various sub parts an some of various sub parts or something like that.  That's my thinking, that's the template.
	Go ahead and take a 5 minute break, come back and, first function we will right is size, give ancestor tree and how many people are in it, how many child objects are in it.  Okay, come back to that in 5 minutes.
	[Break Time] 
	[Break Time]  
	>>>  Okay.  Just make that little note of recipe swap step 3 C and 3 D.
	The reasoning for step 3 C follows for the reasoning of 3 D.
	Okay.
	Where is my pod, it's recording -- okay, so let's come become and start looking at writing functions dealing with ancestor trees.  So what else?  I'm going to -- make the function size, da-da-da -- and go up there.  I'm going to get rid of this unknown, since I defined it down below, defined twice here.
	So make the function size, made a bunch of example family trees an game them names.
	I guess I can draw in here, we had, good old ABE Simpson's and Homer's mother Mona and both of their parents were unknown.  I'm not drawing in, the, eye colors of people way up the tree.
	But this is how, this is visually how the tree looks so we can try to, to, think -- okay.
	Great.
	So, let's go ahead and make test cases for size.  I'll start the same way we built our examples.  We built our examples like, let me -- mention this -- for building examples, I can say unknown or make child, if you choose make child I have to have 2 other ancestor trees already, so you better choose this, that's why this was our first example.
	And then make child that has unknown, unknown more ma and pa.  And then make tree that's say go ahead and use previous example here as one of or both of the mother's and father fields and so on.  That's why I sort of making small trees, and building them bigger and bigger and bigger until I end up with Bart at bottom.  Start with the leaves and build them up, that's what I'm defining when I make my examples, have to work that way.  I start to make Bart immediately, then I guess I'm make the tree at once.
	If I do in stage it's has to be from the leaves up.
	If I look at these leaves here, -- go ahead and do these, that was a different example, unknown was 0.  Jackie the size of Jackie was, one.
	Just Jackie and her parents were unknown.
	And this was a different example here.  And then okay, I can look at, Marge who had Jackie as one parent, and had Marge and Jackie in that tree and nothing else.  Do I want to?  I can check expect, size of ABE, that's one person in the tree, similar, size of Mona was one, size of Homer was 3, we have Homer and both ABE and Mona, his mother and father and finally Bart here.
	So the size of a tree, I'll copy and paste the template here.  Change the name -- yeah.  I did that, they're in the file that I posted the link to.  I had, that's what I talked about giving the variable name, same name as the person to the root of that tree.  I scrolled past it, I didn't type them in, no.
	Okay.  I'm changed the name, function size, oops, there, what's type of size?  Takes ancestor tree, anc tree and returns natnum.  Natural number.  Okay.  Here I called it, go ahead and call it anc rather than TR for tree.
	I think I got names all reconciled there.  If I have unknown family tree, what's my answer?  0.  Okay.
	Great, I have, a child, what is the size of that tree?  Well see how the name account play into the answer?  It doesn't, eye color don't matter.  Size of mother and size of father, what is type of size of child anc?  What type is that?  -- what is the type of size of child ma of anc.
	-- not ancestor tree, natnum, yeah.  So Chris why do you say natnum.  Because, I'll answer for you, size returns a natnum.
	Child ma was ancestor tree, but remember that's not what was in template.  Template says use this recursive call, this problem we have 2 INTS, 2 natnums an we need to make natnums an in particular go down and look at test cases, suppose given size for Bart.  And need to get the answer 6.  This is inventory with values here.  I'm thinking of a specific tree, what was child ma of Bart was the whole tree, for Marge, and what was size of Marge?  It was 2.  	So this whole thing, if given Bart, this is the number 2, pa is Homer, size of Homer was 3, so, I have the number 2, I have the number 3 and I need to get to the answer 6.  How do I get from having 2 and 3, how do I combine those to get the answer 6? 
What should I do?  -- now simultaneously thinking this specific case but also general case as well.
	How do I combine the size of mother and size of father to get the size of the overall tree?  -- use plus -- but plus of 2 and 3 was 5 -- and I need to get 6.  Right?  -- yeah, plus the child itself, sow size of Bart's tree is the size of his mother's tree bus the size of his father's tree, plus himself.  Okay, so plus one for that.
	Okay, so that's the code.  How many characters in here not in the template?  Let's see, 0, plus, 1.  3 characters, and in particular, this problem in our thinking we had no trees going on whatsoever.  We had 2 numbers, that's what the template gave us, 2 numbers and that's where we started our thinking.
	Now, you look at this code, and in your gut you want to unrl of recursive, size of child ma, that goes in recursive call da-da-da, you do need to think flew that at some point and go through it.  But the right way to think about it, say I have the result on the mother, I have result on father and all I need to do is combine them.  The same way we made our test cases I had to start with, (Inaudible) somebody who had unknowns an parents and then unknowns an somebody with unknowns as parent.  So, the same reason I have to make, start with small trees an build them up to follow data definition.  Well that's what's going to happen here, recursively why is this going to work -- think of size, first run anything all of the small trees.
	Then once you have small trees go ahead and apply this rule and make on slightly bigger trees and then slightly bigger trees.
	Think of it as from a bottom up sort of, starting with the small parts and computing the answers an your code is -- say, hey, how do I take small parts already calculated.  Recursive call happens first and then I put together to get answer.  If you're thinking about this problem, trying to write code as you were writing it you think you have ancestor trees, you're not following template, the template says make that recursive call and use that result, you had 2 natnums and that's all you had to work with.  It was enough, 2 and 3 enough to get your answer, add them together and throw in one more, let's see if that runs our test cases, 7 tests pass.  Okay, questions?  Thoughts?  -- 
	And, feels unnatural to not think, but that's the right way to think about it.  After a while it seems like the right way to think about recursion.
	Module, define make sure you're in the beginning of student language.
	So -- and the other thing is -- you should not see any lines up at the top and I mean start with comment, or whatever I started with in that file.  Should not see 3 lines of gobbly goop on the top.  Maybe, beginning student is enough for this one.
	I'll make sure.
	Yeah -- if you see these 3 lines, yeah, remove it, the other thing if, if you download the file and open in Racket, it's fine.  If the open file in browser and copy/paste and paste you get those 3 extra lines of content that should not be there, they're there but beginner student suppresses them.
	Okay.
	Okay.  No you can think, YOY I'm open mind to that.
	We wrote our first function and go ahead and write 3 more functions.
	Change name.
	I want to go ahead and, give me an ancestor tree and name to look for and I'm going to fix that, change that name everywhere it occurs.
	I go through family tree and say change Joseph to Joey, it would make all the changes everywhere in the tree where Joseph occurs, -- different people named Joseph become Joey.  How should we do that?  Again, I'll make a couple test cases here.  And these I don't have typed in advance.
	Change name, of, unknown -- oops -- should I go ahead and do Joseph and Joey, think of other names people might want to change, especially those that occur several times.
	If I take unknown, change every Joseph to Joey, what is the answer?  -- if easy -- if I take the unknown, the ancestor tree of unknown and change every occurrence of Joseph to Joey, what's the answer -- the result of changing those names?  Yeah.
	And now, go ahead and we can take, go ahead and use one of those tree that's had one person, I'm trying to think -- what is Marge's mother's name again -- blanking on it.  Jackie -- okay.
	I'll take, I have variable, if I take Jackie and replace every Joseph to Joey in there, what tree should I get back?  The exact same tree that I started with, right?  So, yeah I could type in, make child of Jackie and 1957 blah-blah-blah, I could just say Jackie, that's short way of saying that, wherever you see Jackie gets replaced with that particular tree.
	I could say, that tree Jackie, change Jackie to something.  Change Jackie to Jack, do retroactive gender swap on Jackie.  Okay.  There the answer is going to be, child of Jack and now I need to look up, Jackie was 1926 and brown -- and unknown, unknown.
	Okay.  And then one more thing that maybe more interesting, one more test case -- let's change name and I'm going to have some, do the Joseph to Joey.  And I'm going to make a more complicated tree and make child of Joseph, and use 50 and blue for everything.
	Joseph, 50, blue, who's mother tree was make child of aim Amy 50 blue and Amy's parent's were -- this is going to get involved, maybe I should have had these done in advanced.
	About I want another Joseph that's a couple generations up, Amy's mother was named Joseph, that explaining problem beside aim any perhaps.  50 blue unknown, unknown, S Amy's mother and -- Amy's father is going to be, sorry.
	What's this?  -- that was all Amy, oh, I need a second, there we are.
	Exactly, yeah.  Okay.  And Amy's father was named Joey.  Interesting.  So these are the some of the test cases I do to make sure Joey doesn't get changed away from everything.
	Okay.  That is all Amy.  2 parents for Amy, that was Joseph's mother and now Joseph's father who is named Joseph.  Probably should go back few more generations, but I'll stop with, that.
	Okay.  If I go in there and change the name Joseph to Joey in that tree, what should the answer be?  Thank heavens for copy, paste.
	Right?  -- copy and paste, wherever I see Joseph in there -- okay -- WHEW, I probably should give names to these things.  This is just one test case, doesn't capture all of the situations, I'm going back 2 generations.  Yeah.  So that's, and you're right, in real life doing this, you probably have sketches an several trees and make sure you have one.
	See if we can write the code for change name now.
	I'll let you all, do the code, if you have the template, go ahead and copy paste that template and see how many characters we need to change to direct the code for change name.
	 So drop year and eye?  I'm not sure about that actually.  Change name, I guess I need to carry along the name one and name 2.
	Okay, name one, what are the types of here, what is the type of change name with the mother's side?  What type do I get back?  -- that's entire tree.
	So this thing is the entire mother's tree with the name changed.  Here is entire father's tree with the name changed and have the child at the root.  What about the name of the root?  That's going to be -- if you're equal to name one, go ahead and use name 2, otherwise use the name that was already there.  Right?  So we want to make an answer, -- let's look at an example here.
	Inside the tree, Jackie, we decided the answer was a make child Jack, I think Jackie's birth year still played a roll in the answer and Jackie's eye color played a role in the answer.  Can't drop of year and the eye color.
	In fact, this is the, in the resulting tree, this is the string that I want at the root to the tree, for the name of the child at the root.  And this is the year of birth of the root, and this is the eye color of root, and this is the entire left sub tree that's been fixed and entire right sub tree that's been fixed.
	What do I do with these 5 pieces of information to get my final answer?  Exactly.  This is, I'm going to call make child on these 5 things.
	I need to get n ancestor tree out of this.
	Okay.
	So I think that will give it to me.
	If I have unknown family tree and do name change, oh, yeah.  Get back the symbol unknown, that was one of our test cases.
	So, this is one where, in the child case, yeah I pull out the 5 different fields.  Some of them I need to update, some of them I need to change and take those 5 things possibly change fields an reassemble them back.
	Yeah, so if, on this IF, I wrote it hopefully there's clear what's going on.  There's the condition, the answer if that condition is 2, and the answer if the condition is false.
	-- and, one way that I indent my IF, if passing 3 things to it, I think it's important, to read indentation and also, you know, do this indentation your way yourself and if I do something like this, I would be confusing myself.  I would look at this, IF only has 2 things going to it.  So -- I think it's helpful to indent, if calling a function with 5 inputs, either put all 5 inputs on single line or 5 different lines, never put 2 on one line, one-on-one line and last 2 together.  Go one way or the other, as a rule of thumb.
	Okay.  Yeah, let's go see if it works an passes test case.  We did a lot types.  -- I'm surprised they all passed.
	-- and I guess another thing can I go ahead, and -- do, because I already have some of the trees, the tree for Bart, since I have a tree for Bart, go ahead and change Mona to Lisa -- and I can go ahead and do this, and, I, get Bart, as child of 2 children Marge who is child of Jackie and unknown and then Bart's father Homer was child of Lisa and ABE.
	Okay, maybe that's another test case I should have made of test cases.
	Probably because I have that whole big tree Bart already make.  Test something where only occurrences is way up in one of branches, make sure I'm covering the whole tree.
	How much of this code was not in the template.  This unknown -- this here make child, the IF string equal -- name one and name 2, we got as parent names, that was all there.  I count 4 tokens not in the -- the template.
	Okay.  Yeah, so we're turning a new tree, -- just like our input, but with every name replaced.  So, you're right, in the same way, say we have moved bullet in the game, we are not destroying the old bullet and changing it's field, giving back new bullet object that looks slightly different.  Same way with the book and making drive to work from a book.  We made a new book object that contained stuff from the original book object.  
	You're right, this feels weird from Java program.  In Java I want to go in and have one tree object and mutate it.  -- and so this, (Inaudible) functional programming, we're going to go and not mutate things, give back a new answer.
	Again, I think strings in Java are a great, again, modeled to have in your head, called up case on string, doesn't change case level, gives back new string and first string is sitting around.  Exact same idea, here.  Immutable data, to me, that's defining Hallmark of functional programming.
	Immutable data and variables.
	-- okay.
	So that was change name.  That was example, why did I do that example?  So if wondering, first we had take ancestor tree run a number.  Take ancestor tree return a whole another ancestor tree.  That's, why I went through this example.
	Okay.  Let's go ahead and make one more, I think I do have -- quite have test cases here.  I want to make a function called -- all names.
	Takes ancestor tree, returns list of strings, list of all the name that's occurred in the tree.  So in particular, check expect.
	What's the first 3 I should try, test my test on?  -- unknown, exactly.  Always test the trivial cases first.
	Okay, trivial not, it's not necessarily easy, but trivial, the base case of data.  And going to be base case of code, not coincidentally.  What should the answer be, all the names in the unknown tree, not the empty string, what does return type need to be?  -- so that doesn't even get the right -- needs to be a list -- so, cons of empty, cons is function, if we call it we need to give it 2 things.
	I think we want empty list, if I go ahead and look at all names of Jackie, that was our next smallest tree, this I want to go ahead and have a, be a list containing, cons Jackie, empty.
	Okay.  And what's another, small small tree we had.  Next thing we had was Marge.  Who just had Jackie as a mother and nothing else.  Let's go ahead and do that.  Okay, so, you don't need to type this, I'll type this and you can be watching me for now.  And at the break I'll put this up on the web page.  So it's going to be cons of Jackie on to cons of -- actually there's an issue going on here.
	I don't really have, is this definitely the one correct answer?  Or is there a different answer that could also be equally correct from the description I've given?  What's another answer that I also be counted as correct?  For all names in the tree that is, Jackie who's mother is Marge, sorry who's mother is Jackie.
	Try to psychically send the answer to you -- fish.
	Is that the right answer, or is the right answer?  Let me copy and paste -- cons of Marge, cons ever Jackie empty.
	These are both lists that contain all the names of tree.  Gosh writing test case I realize that, okay, maybe this is a fine thing but may not be one different correct answer.  And so check expect, if doing this for real, check expect might not be the right form.  I might have some other, some other test criteria, that says, you need to give me back an answer that contains all of the things in this list here, but might be in a different order.  
	Might have check expect, arranged differently, and write that.  I'm going to with check expect now.  I'm going to be psychic and say that, we're going to return, I think the way the code works, I'll return on the mother side, then the root and then everything on the father's side.  I can make code to do whatever I want, but evening on mother's side, which is Jackie, everything on mother's side which is Jackie.
	Then I'll put Marge, no, no, I think that first one I phrased.  I'll write code that ends up being, yeah I could sort it and say sort of all names of Marge must be this other list here and that would be a good way to list test.  I'll leave that for now.  What else?  Check all names of Marge, how about all names of ABE, ABE just had ABE, but Homer that had, da-da-da the mother's side, which was, Homer's mother's name?  Again?  I'm blinking on it.  Mona.
	Cons of Homer, cons of ABE, empty.
	Okay.  And then finally, what should all names of Bart be?  I think it should be all the names on the mother's side, which is this -- followed by Bart, and then all the names on the father's side, I have pasted in, and then close, close, close, and order is not the correctness of this problem, but code will give an order and happening to choose what I'm going to watch as the answer.
	Okay.
	Can we write this function, do you think we can write this function in less than 2 minutes?  Give it a try.  I'm going to copy and paste -- down here, paste, replace all names.  Da-da-da.  Unknown, we already decided that was going to be this here.  Eye color, that really never comes into the answer at all.  Your birth never comes into it, name does, but those 2 don't.
	And what is, all names of the mother's side and father's side, what is the type of this thing here?  All names of child ma of anc, what type is that?  -- yeah, list of string.  So I have list of string, list of string and what is child name of anc and one individual string.
	So it turns out I want to go ahead and make a list that contains, there's different ways of doing this, first of all, change the order of these 2 things here.
	Put the mother's side first.  An the father's side, I'm going to cons the child's name onto it.  Okay.
	So that gives me a slightly longer list, that's father's side and child at root.  I can't say cons here, can I.  Why does that not work?  -- because, if this was a list, if the father side had 10 things and mother side had 10 things I'm going to want a list that's 21 long, right?  If the father side had 10 items in it, cons of child, that's going to make 11 items, so this list has 11 items, if I call cons I, (Inaudible) where that first thing itself is a list.  That's not what I want.
	It turns out if I have 2 lists and want to join them together, -- I will go ahead and use a function that forbidden to you unless you write it yourself -- append.
	And it's built in.  Not too hard to write append, it follows list beautifully, it takes in 2 lists and returns a list of all of them.  Go ahead, and check expect, one argument found too many.  Looks like I -- da-da-da -- way off on parentheses, that was my, check expect that was doing a bunch of stuff there -- still missing a paren, and goofed that up somehow.  Okay, 2 test cases failed.  Let's look at these -- the actual cons, Jackie cons Marge differ from cons Marge, cons Jackie, oh, I did get it wrong.
	And then here, only difference is, again Jackie and Marge are reversed.  So when doing directions I confused myself and kept the wrong one of these 2.
	Swap Jackie and Marge here, I'm going to swap Jackie and Marge over here.
	I really, by the way I want to give kudos for Steven, really check-expect should be sorting both of those, that is sort of unique and would be exact test.  So -- I should not really be testing for things about the answer that we're not in the description.  Now inside a function there might be comments about we're going to do them in a certain order or code might do it.  If the description says the only job of this function is to return a list of names of tree and doesn't specify order, this function is free if in the future to change implementation to be in any order and test cases should all pass.
	Check-expect sort of all names to of Bart to be sort of the thing that I have.
	Okay.  Cool.
	How many characters, -- on template?  1, 2, 3, -- 3 tokens giving I'm calling append -- again, I don't want to call append unless you write it yourself.  People start calling append when they should be calls cons an thing goes wrong.  Okay.
	One last example.
	All of the children in a tree.
	Not the names of child but actual child nodes in the tree.  Can I do that?  -- yeah, all childs of unknown would be the empty list.  All childs of the tree ABE would be, a list containing that one child ABE, all child's of Homer list containing moan know child object, Homer child object and ABE child object.
	Yes, like here, instead of each string in the list I'm put anything the exact own tire struct, now what's weird about that?  What's inside that struct?  The parents.  Yeah.  I'm returning a list that actually, if you think about what's going on in the memory inside a list containing the Bart tree and just that one child itself has a link to a link to a link that leads up to Jackie and I have Jackie sitting at top level of this list.  Actually Jackie is sort of in here directly and in here hidden in Bart.  Jackie also hidden in here through Marge.  There's a lot of sharing going on.  This is a correct answer, a list of those child objects.
	The child object are referencing other child objects, referencing other child objects, if you think about it, it's a weird thing.  By the way, a list, another function you're not allowed to use until after the current homework, current homework was posted yesterday, I need to put up Dropbox, it's list processing.
	When you do list processing then you can use this built in function list.  The reason I sort of, don't let you use that in homework, is people use it inside their code and want to use cons there, list is great for test cases like here.  I want to make a list with 7 things in it.  Rarely do you use the list constructor inside a function.
	-- homework 6 not posted, it should be, I'll double check during the break.  Thanks.
	Okay.  Okay, so -- turns outs I won't write all   child's that's exactly the same as all names but we don't return the child name, we cons anc itself on to that list.
	Okay.  So note about thinking about the structure that's going on inside.
	Contains, I'll loaf this as exercise to you to write contains, give you tree and string, does that string occur somewhere in the tree.  These are more funks on trees returning different types.
	-- and depending how, brain dead we are doing time traveler example, sure -- I'm going to walk through this one and explain it and do the code, but actually I have this the code in here.
	I want to know if there's any time travelers, given ancestor tree, time traveler is someone's who's birthday occurs before one of their ancestor.  It's somebody that was born before their parent was born if that happens.
	Okay.
	And yeah I guess if that happens it's parent who is time traveler, but same difference.
	Okay.  Yeah, exactly, not meant to, haven't seen that movie, glad I have not seen it, seen on Facebook too many times.
	-- so, how would do you this, things that tough about this, you want to say, here is somebody, where they born before they're parents, temptation to grab child, ma, and compare from the child, ma, pull out year of birth.  What's the problem in general of grabbing child ma field, and from then year of birth field, why does that not always work.
	If I have a child object, what's the type of child ma of that thing?  It's going to be ancestor tree.  Can you call child year of birth on ancestor tree?  No.  If I go to data definition, -- might be unknown.  If it's unknown I'm not allowed to call child year of birth on it.  So I see a lot of books and textbooks, when they try to do things like this, they have a tree, and they reach up into the, one of the, I guess, called child node of the tree, child of one of the nodes and try to pull outfield of there, but they have checks is it mole or stuff like that.  And that's kind of messy, I think we can do better, if you look at this code here and way to do it better, pass along one extra argument and that's a little like -- how we made things tail recursive last week.  Any time traveler, you give me ancestor tree and I'm going to set it up here.
	I'm going to write any time travelers before a year.  What does ta could R do?  Returns anc tree to Boolean, -- are there either a somebody in the tree with a year of birth before their parents -- and that's, or -- is the root, roots year of birth before the -- maybe not call it parent year, just call it year.
	Start year.
	Okay.
	And here what's going to happen.  First of all if you pass me an unknown family tree, I'm going to return false.  Okay?  By the way, I guess test cases down here, unknown tree, false.  Any time travelers in the Simpson family tree, false.  Any time traveler, I'm going to make a child lex or born 1801 and mother Scully, 1970, wait a minute, any time travelers returns true.  Sounds like somebody was a time traveler there.  How are we going to do this.  I'm going to go ahead and make recursive calls here.
	I'm going to say, are there time travelers before, I'm going to pass the mother's family tree and a year that will just catch the mother.  Because, remember, is there a time traveler deep inside the mother's family tree or is the mother year of birth before the year that I'm passing in.  I'll go ahead and pass in, I'll take the mother's tree and I'll take the current.  I'm at the root and I have a mother node, I'm going to say, hey, any time travelers in the mother's node and everybody in there has to be before this roots here of birth.
	I'll pass in the year of birth of the root, and now, the other thing I check for is -- hey, I'm in a tree where everybody has to be before start year.
	Okay?  And if the root of the this tree is bigger than start year, that's a problem already.  And this is how we're going to capture the problem.  Notice there are no checks for being the unknown tree except for the one that we have here anyway.  That's how we tell it's clean code.  I don't have anything here that tries to, look at child ma, if that is a child go ahead and pull out a field of it, otherwise it's unknown, done worry about it, something like that.  That would be ugly code and I'd be repeating this as template multiple times.
	-- I can phrase a little better -- and as root   here of birth, before, should I call start year?  Or end year?  -- year after tree?  I don't know, I'll call it start year, end years almost seems weirder.
	Yeah, and this is a way that goes ahead and I can try running this code -- getting to there, oh, no.  I have an error.  -- and I never wrote the contains, let me comment out all of this contain stuff.
	Okay.  Oh, no -- check failure -- and this is a different problem yet I haven't written as well.
	-- okay, I should -- okay, time traveler test did pass.  These 3 time travelers passed.
	Again, don't, if you're ever writing code whether in Java or Racket and processing a tree and doing things like reach into the node of tree and check if that is null, I had to check if I was null and then go ahead and grab child node and see if it's null or not.  Yeah checking for null twice probably not the cleanest code.  And here is an example getting around it, I'll pass in a value that's sort of I can compare with the child.  
	What I make each recursive call, I'm going to check, hey is the child, I'm going to pass in the child, pass in to a tree, pass in, there's the root to the tree, child to the root, pass in future descendents birthday, if they were born after future descendents birthday there is a problem.  Otherwise go ahead and check back in my tree, my mother's tree had nothing in there. 
Better been born after I was.
	My father's tree, nobody in father's tree better be born after I was.
	I pass in my own year of birth to recursive calls and now again, I have only one check for unknown, not 2 or 3 or 4.
	So -- okay.
	-- questions On that?  I'll go through one more example.
	And this is the entitle function -- okay?  Takes ancestor tree and ancestor tree, and adds mister in front of father's name and Ms. In front of mother's name, what we do, of each father's name and baby in front of top level root's name.
	And now the thing, when you make a recursive call, some level we'll call entitle, and pass it, a tree, inside that recursive call, we don't know if that tree was the mother's side or father's side.  Right?  If I just give you an answer ancestor tree with child node, I know there's that child, was that child node the father or mother of some other node?  Oh, gosh, a lot algorithms say we have tree and back pointers to tree and extra information and maybe that's necessary in some cases, but here is easier solution.  Okay.  Again, it's going to be all about adding extra argument to carry along.
	I'll have, this function entitled Mr. or Ms. To everybody in the even tier tree, except for top level root which is baby.  If I go ahead and entitle Homer, I get back a tree that is baby Homer, and then, Ms. Mona and Mr. ABE.
	Okay?  Here we are.  So, I'm going to do that and interesting thing is I'll never reach back in the tree, how do I do that?  I go ahead and oh, -- entitle help, it will be given an ancestor tree and title to use for the root.
	Which by the way, going to return unknown.  If you give me a child, I'm going to make new tree like we saw before.  And, oh,  for the root I pre-pend whatever the title for the root is, my first call that might be baby we'll see in recursive call may be different.  Same year of birth, same eye color and then go ahead and, reoccur, here is recursive call on mother, label everything on mother's tree and label the root Ms, and entitle help, and everything in the father's tree all the way up, label the root Mr.  Okay?  -- and so this is interesting here, here is function where the node of the tree is not checking, am the left child, right child, descendent, not checking any other nodes up and down the tree, just this one child node and recursive calls an it does everything.
	That's, pretty cool tips.  Advanced tip, if you see code doing a bunch of, when you see code, any language working going up and back down the tree trying to figure out things if one node is cousin of another, think about, can I make a different helper function with a little extra information -- then I don't have to do anything else.  The problem with having one node checkup and down the tree is -- there's a lot more checks for null, to start littering all over the place or a lot more checks for unknown.
	Okay.
	That's something we won't test or have examples on, but that's your advanced tip for the day.
	So -- and some of my baby Homer example didn't work, Ms. Mona and Mr. ABE, I had blue instead of brown somewhere, I switched eye colors of Homer's parents.
	That's problem with test cases.
	Sometimes test cases are in the code, sometimes your test cases are actually just that I wrote the wrong test case.
	Okay.
	I should double check that, I should not just fix that, I should double check that I have the right colors.  Brown, brown, brown, brown, Mr. ABE, blue, blue, unknown, I'm note sure, oh, -- mom more born in 51 versus 55.  Okay.  There we are.  Great let's take a break, when we come back, we're going to look about, how would we write these data definitions, how do we do them in Java.
	Okay, we'll, give the Racket a break and be all Java the last hour.
	Back in 19:52.  Another back to the future here.
	[Break Time]
	Okay, let me check on the homework status real quick.
	There under homework 6, but somehow the link didn't make it.  If you manually type it in, you'll get to it.
	Should have been auto generated.
	I'll putting the link up now -- I thought I, generated that, but the script didn't trigger, unfortunately -- so -- there we are.  Now the homework's page has the homework 6 link up.  Okay, thanks for letting me know.  That's due in one week.
	I'll be getting the homework up as well.
	So.  Homework 5 solutions up.
	Okay.  
	It's Friday, third class of week, so I guess it's like Friday.
	This is file that is link from the lecture pages, link 27 distance ancestor trees, I have a bunch of code down in there.
	Let's go ahead and I'm going to show it in a different tools, I have the Java code pasted into the Racket.  If you want to have a copy of it, but, I was talking before about, by the way if curious, yeah, as I give some of this stuff, I realize some things work better than others, I think time traveler can too convoluted but I like the other example, add Mr. Or Ms.  So, so, see, -- if you reload the homework's page it should be there.  There might be proxy between you and Radford server, and whatever, I'll put the link in here, okay.  Yeah.  Of course I should not have done that, none of you are going to be listening here, you will because you need to know some of the Java stuff for the next homework, okay, cool.
	-- looking at examples, I was talking about, code where you follow pointers up the tree and back down the tree and may have talked about things like this in algorithm class, in general, even with lists, if you're writing this in Java, how do people tend to write binary trees in Java?  What class did you have?  I mean a class in your 220, 324, something like that -- to do a tree, what was that class called?  In other courses you made trees using Java -- yeah, in general you've had stuff, and I'm sure you did stuff exactly like this, reading from the textbook, usually they say class node of the tree.  It might have data at that node and you have 2 fields called left and right.
	I'm, whether or not you read it, I'm sure there was a textbook for the class.
	So -- anyway, regardless of that -- how would you write these things in Java, people often have a class node and say, we're going to have a binary tree with numbers, binary search tree.  Of class node will have the number, INT data, whatever is sort in that node and -- have a node for the left child and node for the right child.  In that path, how did we represent the empty tree or the end of the leave of a tree in that situation?  Or link list?  How would do you a link list in Java or in C?  -- and even if it wasn't covered in courses you might read, there are blogs on the line, or dig up algorithms book -- so.  Link list, something of node, so that's using the built in link list, how would you write link list yourself if it had not been built into the language you want to use? 

	(Laughter) -- so usually people do something like -- like a cons list, yeah.  Here is what usually people do, class node, say a list of numbers.  Okay, they'll have INT, datum, number stored in this node and have something like, node next.
	Node in the list.
	And then have something node saying, if it's the last node, then next will be equal to null.
	Okay?  -- and then you have, code that looks like this and now you have methods to traversing the list or finding maximum of the list or sum of the list and it will look like something we had before, like in Racket, in Racket do we have cond, in code you'll have something like, is next equal to null -- if it is, don't make a recursive call, just use this one thing here.  Okay?  And it tends to be kind of a little ugly code, and unfortunately, null you can't call the methods on it, you can't say, if this is equal to null.
	Because if you're in an object, in a method, a (Inaudible) method you can't be null, because you had method called on you.  So.
	So people say like this, and then things get confusing and student have null pointer errors left and right.
	What's the reason for this?  How did we do, when we had a list of, in, Racket we will had, a data definition, -- and we either said, empty list, or, list of number.
	Now, so again, what I'm saying is in Java, people tend to use, the empty list they tend to use null.
	Okay?  And now so you have one class called cons.  Okay that has fields in it.  And that's the only class people will sometimes have.  And if that's what they're doing, they're doing it the wrong way, they do it there way because oh, I have 2 fields an need to talk about empty list, I stick null in there as my field for next.
	I can't have empty list, can have list one long or 2 long, last node identified because next pointer is null.
	Here is the problem with that.
	It looks like you have, one class.  Class cons.  One type going on.  But really you have at least 2, you have cons an null going on, and doing all sorts of checks for that.  How many names do we have in our data definition here.  How many types do we need?  We need list of number, we need cons, and we need empty.  Those are all 3 required components of this data definition and here is why it still works in Java, is because, well, they're going to have a cons which is a cons object with fields.
	And for this they're going to use null, and for the list of number, they're going to be thinking in their head, cons or null, cons or null, cons or null.
	So a cons or null is either null or a real cons object.
	-- and what type, if you want to pass a list to somebody, what type would you say?  You say type cons.  You might have a function, again in Java, say foo, takes in, input a cons.
	Okay.
	And returns whatever.  Okay?  -- and now you're like, the thing is, do they mean a real cons with fields or cons or null here?  Well, I don't know, it's unclear, could be either one.
	Okay.  So in Java, because null type checks as cons object, you can sort of use null, you can use a cons is definitely not null and either a cons, real cons object or null and you can only have one, you might have one class called cons and use that name everywhere and since using the name everywhere you don't realize there's 3 things going on.
	The right way to do it is what we have here, it's going to be for trees.
	Let me close the door, there's ruckus out here, I'll be right back.
	Okay, we need to have for say, ancestor trees we need to have both child and unknown and ancestor tree, and not just have one thing called node, you know, not have this called node, use null for this and not realize there's something up here because you're saying, if I declare something to be a node I'm allowed to pass null and type checks.  That's just going to go lead to confusion.  You can get it to work and that's how textbooks tend to do this stuff and it's a bit of a crime, but, okay.  You want to say ancestor tree is either unknown or child.
	-- and what is the keyword that you use to do that?  Oh, I can actually say that in Java.  In Java I have ancestor, going to have class ancestor tree, class unknown and class null, class unknown is kind of lame, class unknown is not going to have any fields and, nothing inside of it.
	Okay?  So thinking of it being like that.
	It's kind of lame why have class that does that, one thing that I need is unknown is an ancestor tree.  Okay.  And I need that type checking on Java, so I need to be able to say, extends an unknown is an ancestor tree and child is also ancestor tree.  Yeah.
	And how do we do that?  Through inheritance.  So -- I have unknown and child and they both extend ancestor tree or implement, I guess extends is the term, ancestor tree.
	Hold on a second.  Almost dropped my wedding ring, I was absently mindedly twirling it and went to the floor.
	I would have been in trouble if I lost that.  You can unknown as ancestor tree and unknown as ancestor tree, Java understands this, because I said class unknown ancestor tree, class child has, 4 fields here, 5 fields, and ma and pa, are of type ancestor tree.  This is exactly, this is the what we had in Racket, right?  Yeah.  But, an object with 5 fields and there are the types.  And here the types are part of code.  
	One thing is missing is oh, extends ancestor tree, what is ancestor tree, what sort of field does ancestor tree have?  Nothing at all.  Ancestor tree all we really have class ancestor tree for is so 2 other classes can both subclass it.  We need a name to say there's umbrella type, union type.  This is implementing union type, how do we do it?  Make some name for whole entire union and have subclass that's extend that. 
	That's how we do union types in Java.  You can make an unknown tree, yeah.  You can make, say make, call new child in Java, call new unknown in you want in Java, that's how we create unknown trees, not built in constant like Racket, or we do symbol in Racket, -- so, yeah I'm going to have these 2.
	Say new child, but you can't say new anc tree, you have to give one of subtypes, contract object it has to be one of subtypes.
	How do we tell Java, you can make objects of child and unknown but you can't make anc tree directly you have to make one of subclasses, what's the keyword for that.  It's on the screen here, a little cheating.
	-- you might have been cued into that, is what I mean to say.  Abstract, we say abstract class anc tree, open, close.
	-- open close and that's all there is to the file.
	Okay.
	That's entire class by itself.  And seems a little silly to have anc tree there.  A as an abstract class and no fields, but essential to have that so that the subclasses, so we can say these 2 subclasses are related to each other, both variances of ancestor tree.  See if I can undo that change that I made.  There we are.
	Okay.
	So, great, can do this -- take out that one character there.  Okay.
	These arrows should not about there.
	Okay, so does that kind of make sense?  We'll go ahead and have class ancestor tree and 2 subclasses for it and that's how we make an union type with 2 branches.
	Okay.  Now if you notice I did have code in there.  So first of all, ancestor tree, let's write the function size, now, if I want to tell Java, not only is there type called ancestor tree, why did I name that type?  Because I needed to properly name my fields in down in class child, what is the type of ma and what is the type of pa.  Can be another child or it can be an unknown.  Okay.
	Great.  So I have abstract class ancestor tree, and then I say, we're going to write a method called size and can be called on any ancestor tree you like, how do we tell Java, in abstract class there's a method called size.  We'll not provide code here, the code for unknown, size for unknown things is going to be inside class unknown, the clause for size inside child, things is going to be inside class child.  This is going to be abstract method.  Okay.
	We can't put the code right here in this file.  It will be different depending on what I have.
	This is called the sometimes called composite design pattern, you can use that to impress people at parties -- and really it's an union, we're taking union of 2 types here.
	Okay.
	Da-da-da -- any method we write, we have a little like contains name, we go ahead and have something for it.  Should probably be abstract.
	Okay.  What else?  This, you know abstract class is one place where I tend to put a lot of tests.
	When I make examples of data, I go ahead, and, ABE is this here, new child of ABE, 1920, brown, I don't have symbols in Java, I have strings, close enough.
	Make a new and unknown object for the ma, and make new and unknown object for the pa.  That's how I represent unknowns, it's not symbol, it's object of class unknown.
	Okay.  And by the way if you want to, you don't need to use new unknown if you want to you can just make one unknown ancestor tree and then have that as the ma and pa in different fields here.
	So -- okay.  Yeah, we can go ahead and make Mona.  Same thing here.  And then Homer, will be a new child that using Mona, this is almost line for line what we did in our test cases for the Racket.  Okay.  We made the trees an gave them names an bigger names I can use that name here.
	If I didn't want to use Mona, no problem.  Here is example for Bart.  I'm make new child Bart, 1956 brown, Bart is not 56, 82, something like that.  And then I can use mom Homer, if I don't want to use variable, you can go ahead and make your object right there.  Partly because these are immutable objects.
	I don't care about making 3 different child objects that are all ABE 1920 brown unknown unknown, they're all going to be, I'll control them all the same object.
	Just like in crack Racket, if I have make child of ABE 1920 brown unknown unknown and say 3 places those are all the same value.
	Like?  Java, string cow, string cow, they're all considered the same string, if you built dot equals for strings, it will show you, claim they're all equals so -- okay.
	Yeah, so I can go ahead and do test case, I find putting test case up in that one ob is that correct class at the top, that is natural place to put test cases.
	Okay.  Here is actually -- I'm going to go ahead, and write size.  Here is how I do test cases first.
	Crude way of doing, check-expect, I should probably call J unit or some sort of an unit testing framework to makeup for no check-expect.  Okay.
	New unknown, unknown tree, go to this tree here and call size, I expect to get 0.  I go to tree ABE and call method size, I expect one.  Homer call size an expect 3.  These are the same test cases in Racket as well.
	How do we write the code for size?  -- well that's where it's a little bit sneaky.  I mentioned this already, for size, my IDE keeps adding -- extra arrows.  -- in object, framework where do I put the code for size unknown, inside class unknown.  Where do I put the size for child object, inside child.
	What was the size of an unknown ancestor tree?  -- that was just 0.  Right?  -- here is our code right here -- in is size, return 0.
	INT size return 0.  Sometimes I'll write this, this is a little weird, -- even those it's not explicit there's parameter called this, that was created for me, Java named it and setup for me and refers to an object type unknown, unknown somebody is invoking method on.  I like to remind myself that's piece of information I have sitting around.  Okay, yeah, INT of size returns 0.  That's how it work for unknown.
	I'm going to override again.  Abstract in ancestor tree, override for unknown and override it inside class child.
	Okay.  So first of all, okay, standard constructor here, da-da-da -- size -- hey I have it, something, called this, okay.  This dot ma, that is something of type, what is it's it type.  Anc tree, I can call size on any anc tree, so I'll do it, size of mother's might be 0 if mother's side unknown, go to father's side, eyes, return one plus ever sum of those.  That's exact same code we saw before.  Right.
	How do people feel about this?  Making sense?  Too easy?  Too hard?  -- leaving you all keyboardless.
	Yes?  No, anybody?  Okay.
	One of these days I'll talk for 3 hours straight and forget to ask a question and realize I was never logging even on.
	This is how do ancestor tree but how to do in Java instead of Racket.
	There's a lot of similarities, code is almost line for line, the difference is, again, in Java we need to define the types as part of language and that union type, that's one thing here, need to say, -- unknown are ancestor trees and child objects are ancestor trees.  And this is how we do it.  Make abstract class, and sister tree, and then, inside class child, class child extends ancestor tree.  That's the critical piece.  That's what tells Java that a child is one type of ancestor tree.
	In Racket it was a comment, here it is an actual code.
	If you look in the Racket file, it's all there.
	I probably should have used this, abstract class anc tree, nothing inside it.  Class unknown, no fields but extends anc tree, class child extends ancestor tree and type pa and ma is ancestor tree, that's one essential part here.
	And they have different reasons for this.  But this is having a union type is not only reason you want abstract classes but one, I think key one.
	People don't talk about union types they don't understand they're using union types.  Sometimes you'll say composite pattern, yeah, that's advanced thing, but it's just union type, -- yeah, so, then we go through, da-da-da -- yeah, so then I have the code and this code is also posted up, I'll make sure there's a link to the web page of those 3 Java files.  It's harder to prove those, because it's sort of, I'll give you link toward directory to bunch of files.
	It has 3 Java files an 3 other housekeeping files.
	Do you want to say I want a function size and I want sized to be both unknown and in child and want to let you know, if I any type of ancestor tree I'm allowed to call size.  That's why I put abstract here.  The header of the function, with the word abstract and semicolon and notice no code here in the abstract class.
	And then, down in unknown, I have real code for size and then in child real code for size.
	Yeah.
	So -- yes, unknown, size, 0.  Class unknown we have -- where did it code occur in the Java, here are the code for size is scattered between unknown and child.  The real code is sitting, in 2 different files.  In Racket we had in one place and had a cond.
	Cond is, if I'm an unknown use this code, otherwise if I'm a child, use that code.  Okay.
	What do we not have in the Java version that makes this simpler?  One thing we don't have in the Java?  -- you have 2 classes and you're right, in so, one thing in the Racket we didn't use a whole class for unknowns we just used symbol for unknown.
	We don't need any fields.  In Racket, sorry, in Java I don't need fields in inside class unknown but I need to make it a class only so it can have relation to ancestor tree.  I needed some way to say unknown is an ancestor tree, I can't say string extends ancestor tree, because Java won't believe me.
	Okay?  -- so -- I'll have the posted code, yeah.
	Da-da-da -- unknowns have a size, inside class unknown we return 0.
	And that's, exactly the code that we had.  Go to the top of this file -- oops -- yeah, like 27.
	So here is the code for size for unknowns an here is the code for size for childs.
	-- and now, the Java version -- yeah.  I have oh, the code for unknown is inside class unknown.
	INT size returns 0.  Inside child, INT size, return you one size plus of my and plus of pa.
	Unknown has no size, size is a method, not a field, right?  -- so size is a method as I function not a field anywhere.
	-- okay.  Only Racket says like 27, the one that distance ancestor tree Racket, 27?  The one I gave link to?  -- different file?  -- line 212, again, since I type things differently it's a little different, let me pull up, changed it here on my -- yes, so the part that I included inside the rack hell function I haven't talked about any of the functions.
	I just sort of did the data.  I just had.  Only the fields, which there are non notice answer ancestor tree, class unknown and class child had those 5 fields.
	And contractor, which, doesn't really matter -- yes size is a method, it's not a field.  Well it's different because again, I give strip down version here that is just the fields -- and then in blue Jay thing here I have fields an methods.
	Here is method, no fields, but one method.
	And, anc tree has method both unknown and child need to have that method.  So -- okay.
	Yes,  size is a method, so the code, so, what I have in Racket file is how to structure the classes and the fields, define struct, how do we have methods an again, in Racket we put the code for size altogether.
	And it had to handle both unknowns an childs.
	Okay?  -- and so the answer, I was fishing for the cond, we had cond with 2 branches.  What do we not have in Java code, no cond.  Nowhere do I say, am I, is this an unknown object or is this , child object -- why?  Because if I'm inside, executing this method here is because type system, hey, this object is a, something of class unknown, call it size method.  If I get to this code I don't need to ask, if unknown I know what happens.
	There's no cond going on, if I reach method size inside class child it's because somebody called size method of object that was a while.
	In particular look at this call here.
	This -- this ma dot size, will this call size method of child or size method of unknown, the answer is I don't know.
	-- Java handles that for me.  If this is unknown, it called unknown size code.
	If this dot ma is child, it will call child size code.  which would be the recursive case.
	-- but it compiles, even though I don't know which it's calling, I do know that this dot ma is of type ancestor tree and I know all ancestor trees have a size method.
	How did Java know that, that do all ancestor trees have size method.  I had to say -- make abstract, I have to say, all subclasses of ancestor tree are going to have a size method.  I know I'm an abstract class, can only make subclasses, can't be ancestor tree without being either unknown or a child, which is what we wanted.  So the abstract keyword was exactly what we wanted and abstract keyword here, is I can't tell you the code without knowing what type I am.  I will tell you, it's guaranteed to be there, no matter what type of ancestor tree you are, there will be a method size, that what this line in abstract class ancestor tree is saying.
	-- yeah, so -- I'll go ahead and have this out there.  I'm using -- the blue Jay IDE, I like blue Jay, more lightweight more than (inaudible) and let's me focus on the code I want to write.
	I go ahead and do things like new, unknown -- call it, and get back an object reference of type unknown.
	I can say new child -- and I can go ahead and give it Jackie 1921, blue, new unknown, new unknown, and get back, there's a wild reference.  And if I, nice thing about blue Jay, I can click on the tiny red thing and shows a picture of that object, there are 5 fields, Jackie, 1921, blue and, has the types there, ma and pa, it has arrow, because those are actually, you think of these as references to another object.
	Double click on that.  And I get a pause.  An unknown tree with no fields.
	Okay.
	So, -- anyway.
	I'll put this, file there.  It will have 3 Java files inside it.  And 2 or 3 others that ID uses, it has file where it remembers all the positions in this window here and stuff like that.  So -- okay.
	Let's go ahead and write one more method for trees -- we did, size is already done, should we take one of other ones in Racket code?  -- see how to do it in Java?  -- what's another example after size?  -- we had changed name -- okay.
	How would we write changed name in the Java version?  -- so we have 3 different files in Java version, we'll do a little bit, scatter this code among all thee files.
	Not any more code, just organized differently, how do I say that change name you can work it on any ancestor tree you want.
	How do we say that?  -- which class do we need to look at?  -- yeah, go up to super class, abstract class and say, hey I'm going to go a heed and have, change name -- and going to have the tree and a string named one, and string named 2.
	And what's the return type?  The return type is going to be ancestor tree.  Okay.  And what's the code for it?  I'm not going to have the code here, so put semicolon at the end of this, and declare, if I start compiling now it gives error, missing method body or declare abstract.  Okay.
	Yeah it's going to be abstract here.  Okay.  And now I try compiling, turns out ancestor tree is fine but brought me down to class unknown.  And the error message, unknown is not abstract and does not override change name, oh, I need to override change name.
	Okay, let me do go ahead, I'm not going to say abstract, I'm going to say -- change name -- let me make this window wider.
	And now can I put real code here, string name one, string name 2 -- what's the actual code that goes in here.  If you walk up to class unknown, if try to do a change name on unknown tree, try to change Joseph to Joey in the unknown tree, what's the answer going to be?  What was the answer in Racket code?  -- called change name and unknown.
	Am I fading out?  Is my audio good for people, oh, looking sorry.
	-- if I have empty tree, unknown family tree, change every Joseph to Joey, great, kind of already done, unknown family tree@ answer.
	I know in third hour of blues, wrapping up here.
	Yeah, -- the answer is unknown family tree.
	So return, you know -- again use the symbol here we has to be struct with 0 fields.  Great, that's going to be class unknown -- okay.
	And now we have still one error, when I compile it looks at whole system, it says class child, class child didn't, you said every ancestor tree could do a name change -- string name one -- string name 2 -- and what is this answer going to be?  And again, think of the Racket.  It was a call to make child, and I passed in the result of recursive calls, the same year of birth, same eye color, IF expression for the name.
	So -- go ahead and do this, return new child -- okay.  New child had 5 fields.  What was the eye color and the year of birth?  No problem.  That was the, exactly the same as my, the one I received to this function.
	Understand that better in Java?  Okay.
	I'm sorry, you feel it makes more sense in Java?  Or Racket?  -- oh, good.  Hopefully it will come together.  It's exact same code, can I almost point to every single word and show the same word in both files.  So, maybe this will merge both things together.
	Okay.  What do I do here?  Take the mother's side, and show parens around that, and then make recursive call.
	I'll do that for both the mother and the father.
	And then only thing that really needed, like, chieking was, hey check if, the child's, roots name is, name one and if so, use name 2.  Otherwise use name one, sorry use this child's name.
	So -- again, let me try and get Racket code showing the same time, da-da-da, scroll up.
	Scroll down -- here we have a little I -- if string, for the if statement, if expression in Racket, use the (Inaudible) operator, it returns the value and throw in bigger context, that's what we had in Racket.
	Child name of ancestor, not called anc, it's called this dot name dot equals name one.  Okay.
	If so, u name 2 -- otherwise use this dot name.
	And you're right, I don't say this dot all over the place, the reason I'm writing with this dot, it plays, the variable this, parameter this plays the role of anc in the orange one, you can shorten it but it confuses what's going on.  Okay.
	And, -- did illegal character typed in there.  This all compiles.
	This will go ahead, and do those exact same tests with he had, -- same code running the same way in 2 different places.  And I'll again post all of this on the lecture page.
	Did I have any changed name?  No.
	So -- I will go through and do one -- just for fun to finish up, prove this happens, -- print line of ha ha so we know where we are, plus Homer dot change name from Abe to Lincoln.  Compile, we'll run, what was it, the main inside ancestor tree -- da-da-da, have to pass it in array of string, there we are, we get new child Homer, who is the son of Mona, blah-blah-blah, and father is Lincoln.  That code did reoccur and bubble up and start talking about stuff up there.  So -- okay, printing, not unit test, but that shows how that code fits together.
	Okay, I'll leave you with that.
	And we have the homework 6 out -- and, I'll go ahead and, tomorrow, hopefully try to post which videos to watch and look at for next time.
	-- and then spend the whole time going over problems, working examples.
	I'll put up comprehension examples as well alongside of videos.
	Okay.
	Sounds good.  Now it's Friday night.
	-- again I'll hang out if you have questions.
	And I'll be putting these lectures and these notes up over the next 20 or 30 minutes.
	Okay, sounds good.  Hopefully, this made some things click a bit and we'll see more examples of doing things in both in Java and in Racket.
	Also, somewhere in there -- just going through lecture, that's 3 hours of work and I have 3 hours of time to do stuff, I'll put up solutions for homework 5 and grading to do as well.  These are all on my cue, see what I get to.
	-- I might take a couple days, well no, somebody might want to start watching videos tomorrow night, I'll make that higher priority.
	-- okay.
	See you next week.